Game Development Community

Need help with animation Matrix

by Enel · in Torque 3D Professional · 09/13/2010 (7:05 am) · 3 replies

For some reason, instead of using inherent blend animation, I need to invent my own.
For this, in the 'handleBlendSequence' function, I chose to input final matrix into
the smNodeLocalTransforms[nodeIndex] as follows.

void TSShapeInstance::handleBlendSequence(TSThread * thread, S32 a, S32 b)
{
.... // Get Key animation in thread
...
// apply blend transform 
      // previous smNodeLocalTransforms[nodeIndex].mul(mat); is multiple(blend) anim 
      smNodeLocalTransforms[nodeIndex] = mat;       
      smNodeLocalTransformDirty.set(nodeIndex); 
}

But as you can see in the following video, whenever I play the animation, the position
of the animation is not correct.



Do I need to do something before I input the final matrix into 'smNodeLocalTransforms'.
Or is there something that I'm missing?

#1
09/13/2010 (5:46 pm)
edit :)
#2
09/13/2010 (9:23 pm)
You need to export your sequences as normal (not blend) animations. When you export as blend, the key matrices are relative to the blend reference frame and cannot used as absolute values (they can be only be used to modify other matrices using mul()).
#3
09/14/2010 (12:17 pm)


Little Success!

Prototype Non Blend Upper Body Animation

Im newbie programmer but so proud to me :]