Another way of Flipping Enemy with his movement

I just used the moveSpeed Math sign to flip the Sprite since we already take care of that

void FlipEnemyFacing()
{
transform.localScale = new Vector2 (Mathf.Sign(moveSpeed), 1f);
}

Looks great, I would have not thought of that.

Privacy & Terms