Quantcast
Channel: Latest Questions by Scion
Viewing all articles
Browse latest Browse all 4

Character rotation help needed.

$
0
0
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); }

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>