Make a character face left. without flip
I'm looking for a way to make an animation face left without the need to keep track of the direction it is currently facing. I've looked around and I've found many answers that say to keep a bool "IsFacingLeft" or similar. then implement a flip () function.
i would like to be able to simply set scale x = -1 or any other way of making it face left without the additional variables and functions.
this is for a 2d game. if that wasnt obvious.
Answer by finlay_morrison · Oct 29, 2017 at 05:15 PM
Use this when you want to flip it
transform.scale.x = -transform.scale.x
This should work, notify me is it dosent
Your answer
Follow this Question
Related Questions
Unity 2D networking movement syncing help 0 Answers
2D Top Down Movement Control Help. 1 Answer
Player keeps bumping when walking over to another sprite 1 Answer
Unity 2d - Coordinate grid is way to big? 1 Answer
Unity 2D Sprite artifact/bug 1 Answer