Dynamic Particle Emission Mask

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alb
:warning: Old Version Published before Godot 3 was released.

Hi,

I am making a phonics games for children and it would be great to have a mask particle effect on each of the alphabet letters.

The editor has a particles button that allows loading and clearing emission masks. Is there a way to do this in code?

One option seems to be using set_emission_points() in the particles2D node. That takes a Vector2Array. Anyone know how I’d calculate this Vector2Array from a texture. Presumably that’s done somewhere in the engine when loading a mask manually.

Cheers,

alb