Rotation in direction of movement help...
Speedy007
Member Posts: 229
So I'm making a simple bug smash game and I want my actor(s) to spawn then move in a random direction..Now that was easy enough...My problem is having it facing the direction its moving...I did try what was posted here before but that didn't work...It kept spinning out of control or didn't rotate at all...Here is what I used.
Comments
Set "Relative to: scene" in the Move Behaviour, then use a Timer to change the rotation:
Timer:
After 0.01 sec
self.Rotation = vectorToAngle (vel.x,vel.y)
http://www.arcaderz.com
It stopped
him from spinning all over the place but it still is off...Doesn't rotate right...
Use the Change Attribute behaviour not the Constrain Attribute.
http://www.arcaderz.com
The bug graphic is off by 90 degrees. Redo the graphics and make the bug's head face directly to the right ---->
Facing right is the 0 degree position.
ahhhh....lol...thanks...will try that....
And it works like a charm...Thanks ya'll
You are welcome!