Need help rotating a object.
I am trying to make a basic ship flying game. Kind of like in asteroids style game. I have it set-up so the W and S keys move the ship forward and backwards.
That was easy enough. The troubles I am having are getting it to rotate left and right.
-When D is held
--Rotate the actor Right by 2 degrees
-When A is held
--Rotate the actor Left by 2 degrees
This works and the ship will rotate left and right. Except it won't stop rotating in one direction. Once it starts spinning it won't stop.
Gravity is turned off and I am not sure what else could be causing this.
Hopefully someone understands what I am trying to accomplish and can help me.
Thanks
I am assuming that you are using the "Torque left/right" blocks?
Try setting the actors angular dampening to something above 0 with the "Set this actor's angular dampening" block (effect).
This could be because your actor is floating around in free space (much like an asteroid) and if nothing is in its way it will spin forever. Angular dampening essentially means that spinning objects will slow down over time and eventually stop spinning; the higher the value, the sooner it will stop spinning, and like all physical effects the value will need to be adjusted according to the mass you set for your actor.
Hope this helps, let me know if it is not working.

.