![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | indruckbalazs |
Hello!
I have a question about 2d sprites flipping animation and I hope someone can help me.
So basically I have 2d sprites in a 2d game and when the player character changes direction I want it to have a nice flipping animation as if it would rotate around its Y axis “in 3d”.
Here are 2 example videos I saw on youtube:
Is there any standard way to achieve this easily in Godot? As far as I know Godot has “true 2d”, not “fake 2d” (2d in 3d, e.g. we don’t have 3 axes).
The only thing I can think about is to scale the sprites on the X axis in some key frames in the animation player. Is there a better way than this?
Do you mean that the sprite is slowly rotating around the Y axis, or that it’s flipping instantly? If it’s a slow change, I think the only thing to do is to keyframe the scale like you said. Otherwise, the Sprite node has flip_x and flip_y properties.
Death of Shadows | 2021-01-12 23:24