New to Unity development and I am having an issue where I come up to a wall and when I move my player away from the wall, the sprite flips into the foreground
The code I am using to flip my sprite is:
private void FlipSprite()
{
m_FacingRight = !m_FacingRight;
transform.Rotate(0f, 180f, 0f);
}
I have done another tutorial game and did not have this issue, so just wondering what I am doing wrong. Any assistance is greatly appreciated.