Game Development Community

SetAutoRotation second parameter

by Peter Robinson · in Torque Game Builder · 06/25/2005 (9:09 pm) · 0 replies

I had two suggestions. One of them was a mount offset, but it appears that it's already been mentioned several times. So moving on. My other suggestion is adding a second param to setAutoRotation. It would be a degree to stop at. Say for instance in my game when the player is moving right he has a rotation of 90. Now if he changes directions and moves left I want to change his rotation to 270 but I want to do it smoothly. I use a scheduled repeating function to change his angle 1 degree until he reaches 270. I would save me a HUGE amount of work if I could just say:

%obj.setAutoRotation(20,270);

It would be even cooler if I could change the 270 to 1080 and have him spin around three times (although I don't really know what I would use it for yet).

-Peter