How do I set the location I want my Particle2D to appear given that I have the location stored as a variable?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jackson King

As the title says, I would like to know how to set the location I want a Particle2D to appear, given that I have the location stored as a variable.

:bust_in_silhouette: Reply From: kidscancode

You weren’t very specific, but setting the location of any Node2D node is a matter of using the position property. Assuming you have a reference to the Particles2D node:

particle_node.position = some_var

Note that some_var here would have to be a Vector2 value

Eric Ellingson | 2019-04-09 06:10