Rotate Actor relative to his walking direction.
AlphaCentori
Member Posts: 57
Hi!
I'm making a bird's eye view dungeon exploring game.
I know how to make my character move right, left, up and down but i don't know how
to make him pivot on himself to face the direction he's turning.
How can i make my character turn right on itself when i press the right key or left when press the left key...?
Thanks for all!
Really appreciated
Comments
Sounds like you'd just need to use a Rotate Behavior and have it rotate clockwise when you press right and counter-clockwise when you press left.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Actually it needs to move in all four directions, left, right, up and down. So when it goes in whichever directions it need to face that direction....
I'd have to see your rules and see exactly how you have your movement set up to help out more. Can you post a screen grab of your current movement rules?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Sure it's up, down, left, right upon pressing the arrow keys on keyboard.
I made a copy paste mistake by pasting the "right" command twice on the picture....in reality it's down
Don't know if it's going to help but I used this rotation for my 2d character.
If game.boolean = true
interpolate self.rotation to self.angle (-360 or + 360) depending on which way
And you need to set the button or rules which fires off the game.boolean
Ok guys got the solution, thanks for your help!
Just got back from lunch, glad you got it worked out.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Glad you got back from lunch.
@socks lol, thanks.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page