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?

in Engine by (27 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.

by (439 points)
selected by
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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.