I'm making a platformer game with A and D as the controls for left and right navigation. When the player presses the "A" key the character is supposed to rotate 180 degrees from their current facing point and start moving in the other direction(left), however the code does the rotation but the character ends up going backwards (facing left but going right)
I cant seem to figure out how to fix it any help would be awesome.
the code that I'm using to handle the rotation is:
if (Input.GetKeyDown (KeyCode.A))
{
transform.Rotate(0,180,0);
}
↧