0 votes

I have a AnimationPlayer animating a Sprite node. In the AnimationPlayer there is a position track with two location keys set at x = 0 and x = 10. Effectively when I play the animation it translates the sprite from right to left. Is there a way to 'h_flip' this translation to make the translation go left to right (i.e x = 0 to x = -10) without making a new animation?

asked Jun 9 in Engine by lilithtb (26 points)

1 Answer

0 votes
Best answer

Use two AnimationPlayer nodes.

The first one will be for the regular animation and the second one
will be used for the forward and back movement
you wanted to do.
(flip only the first animation node using "flip_h = true/false" if you only want the right to left movement).

As long as you dont have a position track on the first animationplayer, the second one should be able to do the movement you want flawlessly.

answered Jun 9 by dustin (406 points)
selected Jun 14 by lilithtb
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.