Actor Rotation Issue
Hey, been working on a game and we've come across an issue. What we want is the character to face up when going up, face down when going down, and when you change direction, have the actor arc around so we have some fluid motion going.
Basically we want the actor to be able to move like an S on it's side. Any ideas?
Basically we want the actor to be able to move like an S on it's side. Any ideas?
Best Answer
-
LumpApps Posts: 2,881
To have an actor face the direction it is going you have to have the image face to the right. (for example if you have a rocket have the tip face to the right.)
Then ad a constrain behavior:
Constrain: self.rotation to vectortoangle(self.motion.velocityX,self.motion.velocityY)
For the S motion I suggest you have a look at this:
http://forums.gamesalad.com/discussion/38780/free-sin-and-cos-tool-for-cool-movements-free/p1