It's animating normally, but the position of meshes it's wrong, check the picture:
How should be:
Code that i used:
Code: Select all
IAnimatedMesh* mesh = smgr->getMesh( "obj.b3d" );
IAnimatedMesh* anim = smgr->getMesh( "anim.b3d" );
ISkinnedMesh* skinmesh = (ISkinnedMesh*)mesh;
ISkinnedMesh* skinanim = (ISkinnedMesh*)anim;
skinmesh->useAnimationFrom( skinanim );
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
node->setLoopMode( TRUE );
node->setFrameLoop( 0, 100 );
node->setAnimationSpeed( 30 );
node->animateJoints();
* if i use one just file, with mesh and animation on same file, run perfectly