I can't seem to get it to work. For example in the knight demo I tried to make the knight look to the right while animating:
Code:
if( !_freeze )
{
_animTime += 1.0f / _curFPS;
// Do animation blending
Horde3D::setModelAnimParams( _knight, 0, _animTime * 24.0f, _weight );
Horde3D::setModelAnimParams( _knight, 1, _animTime * 24.0f, 1.0f - _weight );
// Animate particle systems (several emitters in a group node)
unsigned int cnt = cnt = Horde3D::findNodes( _particleSys, "", SceneNodeTypes::Emitter );
for( unsigned int i = 0; i < cnt; ++i )
Horde3D::advanceEmitterTime( Horde3D::getNodeFindResult( i ), 1.0f / _curFPS );
if(Horde3D::findNodes( _knight, "Bip01_Head", SceneNodeTypes::Joint )) {
NodeHandle spine = Horde3D::getNodeFindResult( 0 );
float tx,ty,tz,rx,ry,rz,sx,sy,sz;
Horde3D::getNodeTransform(spine,&tx,&ty,&tz,&rx,&ry,&rz,&sx,&sy,&sz);
rx=-45;
Horde3D::setNodeTransform(spine,tx,ty,tz,rx,ry,rz,sx,sy,sz);
}
}
This doesn't do anything to the knight's head, except when I comment out the two Horde3D::setModelAnimParams lines. Looking at the engine code for setModelAnimParams, it doesn't apply the animations yet. How can I write the joint-node transformation after I've applied the animations, but before rendering?