Game Development Community

Character position driven by animation

by Nick Gronow · in Artist Corner · 09/12/2007 (5:38 am) · 3 replies

When you play an animation for several of the death animations using "setActionThread" the character actually moves positon in the world position coordinates. How is this achieved? I looked in tsThread, setActionThread in player.cc, and torqueScript to see how this works. I did not see any direct hardcoding that drives these actual death animations. Is it settings in the way their dsq files are set up? I really need to incorporate this technique into my own game so can someone please help me?

#1
09/12/2007 (2:06 pm)
Maybe the base node moves along with the model, like in the walk animations?
#2
09/12/2007 (2:35 pm)
I may be mistaken, but I believe you can have a character's DSQ animation physically move the character around in space (when created in the modeling/animating program). However, that movement is not reflected in the engine when it is played -- i.e., the transform of the character model object stays the same. So even though the object moves, it has the same XYZ coordinates.

Other methods, I believe, need to be used to change the XYZ coordinates while animating (eg, the 'run' animation).
#3
09/12/2007 (3:17 pm)
Alright, well, its just interesting to me that when several of the death animation are played, you can actually see the characters XYZ coordinates change. As a test I echoed the characters coordinates before the animation, and after, and it is definitely different. The interesting thing to me is that even though I searched high and low in the source code and the torque script code for any hard coding or script coding that actually told the engine to change its position I could not find any.