0 votes

I have instanced "Particles2d" in my main scene. I want it to move for example 100px to left, or something like this from the script.(with the local coords deactivated,i want that effect when it moves). Is there a way?(like moveandslide is used for kinematicbody2d maybe,or to try coding drag&drop for the particles?)

asked Jan 7 in Engine by Sakura37 (82 points)

1 Answer

0 votes

You move a Particles2D like any other Node2D, by changing its position.

$Particles2D.position.x += 100
answered Jan 7 by kidscancode (17,762 points)

i want the animation for moving, not to just move

So move a little bit each frame:

func _process(delta):
    $Particles2D.position += 100 * delta

Or use a Tween or an AnimationPlayer.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.