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).

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.

2d Walkthrough

U can use transform.localEulerAngles = new Vector3(0, 180, 0);
goodluck :))