Game Development Community

Swaying Objects....

by Jackie Hayes · in Technical Issues · 03/28/2003 (8:09 am) · 2 replies

I am curious. Does anyone know how to make an object sway? Like if you had a single tall object,like a tower, and you wanted to make the top of the tower sway a little but the bottom would stay still. I have searched all over the place but I seem to be stumped at the moment.

Any help would be deeply apprciated.

Thanks.
MJ....

#1
03/28/2003 (8:15 am)
The transformation you're looking for is called a "skew"; as to how you would do this in Torque, well, skew transforms can be represented in a standard matrix, so hopefully you'd be able to use the standard faculties of the engine.
#2
03/28/2003 (2:18 pm)
The effect you want could be done by putting an animation into your object and the playing it when you want it to sway. Here is a link to a little tutorial on playing animations from the script:


www.garagegames.com/docs/torque.sdk/tutorials/tutorial01/