Как перевернуть характер в Unity 2d
Put this in Update() =
//Flip the player's localScale.x
if the move speed is greater than .01 or less than -.01
if (targetVelocity.x < -.01)
{
transform.eulerAngles = new Vector3(0, 180, 0); // Flipped
}
else if (targetVelocity.x > .01)
{
transform.eulerAngles = new Vector3(0, 0, 0); // Normal
}
Pleasant Porpoise