How do i rotate my actor?
adri chan
Member Posts: 7
So i already got my left and right movements, but the thing is with rotation , when i move right its fine i got it at self rotation 0 on the x axis but when i move right my actor is rotating but upside down i got it to self rotation 180 on the x axis , im just a beginner but i would love to do mi chibi deadpool game.
Comments
That second sentence . . . (”When i move right its fine i got it at self rotation 0 on the x axis but when i move right my actor is rotating but upside down i got it to self rotation 180 on the x axis”) . . . . is pretty hard going !
Rotation doesn't have an axis !? Also upside down rotation is a new concept on me !? Moving right is fine, but moving right is also not working correctly !? The question is a bit confusing (to me at least).
Not sure exactly what you mean but there are a couple different means of rotating. The first is just using the Rotate behavior, which will constantly rotate the actor clockwise or counter-clockwise at the inputted speed. To rotate it directly to a certain angle, just use Rotate to Angle, or make an "Interpolate to self.rotation to __ over __ seconds".
" alt="" title="" />
ok how do i rotate right and left when i press a key heres what i have
Try experimenting with the behaviors I mentioned above by placing them in those rules (next to those linear velocity rules).
If you want him to rotate only as long as you hold the key, just stick in a simple "Rotate" and set it to Clockwise for right and Counterclockwise for left.
If you want him to, for example, do a full spin when the key is pressed then do Interpolate, I think for right/clockwise you would do Interpolate self.rotation to self.rotation-360, and for left/counter-clockwise do Interpolate self.rotation to self.rotation+360. Haven't tried that, just a guess, but should probably work.
thank you c: very much!!!!