Rotating to face direction
QwazzMe
Member, PRO Posts: 39
Hey guys
This is my first time asking help at the forum - I'm really new at Gamesalad... let's see how sweet and helpful you all are
I'm making a small game where a shepherd leads the sheep into a pen. I bought a template, but the movements are controlled with keys and as the game is for iPad, it does not make any sense to use a keyboard, so I need to change to touch.
I need the shepherd facing down when I drag it down and up when I drag it up, in the same way as left and right, and I just can figure out how to do it! I've tried using real attributes, but it is not working. Can anyone help me PLEASE?!
Comments
Constrain self.rotation to vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )
Make sure your image faces to the right if not you might need to add an extra value at the end for e.g. vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )+90
Darren.
I will try, THANKS!
IT WORKS!!!
Awesome, DeepBlueApps