0 votes

I've created an object as a scene (sprite node). This one has an animation that only makes it change position on the y axis.
The problem is that when instantiating the object in my main scene the animation is done from the point (0,0) ... place where I made the animation in the object scene .... but I want the animation to be done just at the point where the object was created .... how could it do
Data ... Use the transform property of the object to animate it

asked May 30 in Projects by Yamz (73 points)

1 Answer

0 votes

The way it is: Do not animate the parent node, animate one of its children so the child moves in relation to the parent. Make sure the child node is at position 0,0 relative to its parent. Then perform the animation on this node.
Example for your instantiate scene:

Node2D //Parent
----Sprite //Animate position here
----AnimationPlayer

answered May 31 by estebanmolca (1,199 points)
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.