- Home /
Flipping animation in 2D sprites
Hello. I'm a newbie in Unity3D and I would like to know how to trigger a "rotating/flipping" animation whenever the player goes to the opposite direction(Left/Right).
Answer by Landern · Dec 08, 2014 at 02:07 PM
You will basically flip the scale on the object to the negative or positive. Unity posted a tutorial that covers this, it's around ~8 minutes in and the script it attached to the object with the sprite. I suggest watching the entire think.
Answer by Gondod · Feb 02, 2016 at 05:27 PM
U can use transform.localEulerAngles = new Vector3(0, 180, 0); goodluck :))
Probably better to flip it tho, rotation in anything but the z axis is probably not good if you are making a 2D game...
Your answer
Follow this Question
Related Questions
How to manage 2D animation states (of same behaviour) for multiple type of characters/enemies? 1 Answer
2D Sprite animation, while rotating in isometric view? 1 Answer
Is it possible to change the texture property of a material via Animation clip? 2 Answers
Sprite animations won't export/run in a published build unless you play in editor first 1 Answer
Create an animated sprite from a folder. 0 Answers