Game Development Community

Limit on rotation

by John Pritchett · in Torque Game Builder · 08/02/2005 (11:43 am) · 1 replies

The engine currently provides a maximum angular and linear velocity limit. I would like to have the ability to constrain angle of rotation as well. In some cases, I set my sprite rotating at a given angular velocity and schedule an event to end that rotation once I've reached a given rotation. In some cases, the schedule doesn't get called in time, and my sprite overshoots the target rotation. In extreme cases, my sprite does a ballerina spin before I get that callback.

Alternatively, having the ability to do a rotateTo( velocity, angle ) would be great. I know there's been some discussion of a similar function for moving a sprite to a specific position, or through a given distance along the velocity vector. All of these would be nice, and while this kind of functionality can be handled at the script level, such solutions are prone to problems when the scheduler lags. The only precise solution is at the engine level, where the specified movement is more directly tied to graph time.

Thanks for considering this!

About the author

Indie developer since 1994, games include TradeWars 2002 (named 10th best PC game of all time by PCWorld magazine), TW: Dark Millennium/Exarch/Dungeon Runners, and Rocketbowl 360. Have worked for Martech Software, 21-6, EIS and Black Squirrel Studios.


#1
08/04/2005 (8:47 am)
I suggested the same thing a while back. Glad to hear someone else finally needs the same function. I end up using a schedule to repeatedly call a function which rotates my sprite one degree until he reaches the correct angle. It would be much easier to call a RotateTo function.

-Peter