- Home /
2d Platform Controller Face Help
Im using the 2d Platform Controller. It works great but i want my character to face in the direction i am moving. How can this be done? If there is a tutorial or script to do this that would be great...
Thank You!
Answer by Justin Warner · Feb 07, 2011 at 02:55 AM
If it's 2D... Make it so if player pushed A, than rotate the player 180, if player pushed d, than rotate the player another 180, and just have it so that here...
var lastRotate
if player pushes a AND lastRotate is 1
then turn 180 lastrotate = 0;
if player pushes d AND lastRotate is 0
then turn 180 lastRotate = 1;
If that makes sense...
Good luck!
I don't understand how to implement this into my game. Any Help?
It's psuedo code, you'll have to code it your self.
Your answer
Follow this Question
Related Questions
Character Controller, wrong direction 1 Answer
"sneak mode" (ctrl key) stops my movement. 0 Answers
iOS Tap to move?? 2 Answers
2d move to point script help 0 Answers
2D Movement Problems 2 Answers