Game Development Community

Tim Hutcheson's Resources

Script-based object rotation

Have you ever wanted a simple script object xy rotation command? Here's my rotateShape routine which will rotate any shape in the xy-plane and schedule a completion script routine. This means that you can overlap the rotation with other movements. The function is optimal in the sense that it recursively reschedules itself so that only one execution thread (step) exists at a time. The rotation rate // and step size are programmable, with defaults of 100 deg/sec and one deg stepping size.

Author Tim Hutcheson Date 01/19/2006 (1:18 am) Comment 2 comments

AIWheeledVehicle steering aid

My first resource While debugging some problems with the AIWheeledVehicle steering, I wrote this little renderImage method that plots the three corners of the steering triangle in front of the vehicle while driving to a destination. Since it took a lot of work to figure out how to do this since I wasn't familiar with the workings of the Torque graphics engine, I think it is worth posting as a primer for others on how to get something simple rendered with an object and it is very useful for debugging how well your bots and vehicle are steering near objects. The lines and corners of the triangle are color coded to help distinguish which is the center, desired and front points. Besides all that, its fun to watch as it makes the bots seem smarter than they are. :o)

Author Tim Hutcheson Date 10/23/2005 (11:37 pm) Comment 9 comments