Animating NxOgre::Characters

dbrock

15-12-2007 19:12:36

Even though our game doesn't use Rag Dolls ( Our project starting in January will), can we animate without using the attachSkeletonMesh() function ?

betajaen

15-12-2007 19:58:06

attachSkeletonMesh function is empty. But you can use normal meshes and animated them as you would do normally with Ogre.

dbrock

16-12-2007 19:14:33

So in theory this should work?


NxOgre::Character *test = mPhysScene->createCharacter(
"Player",
NxOgre::Pose( Ogre::Vector3( 294, 108, 204 ), Ogre::Quaternion::IDENTITY ),
"type: box"
);

test->attachMesh("Donkey.mesh");
test->createNode();
Ogre::AnimationState *animation = test->getEntity()->getAnimationState("Action_Idle");
animation->setEnabled( true );
animation->setLoop( true );

betajaen

16-12-2007 19:18:39

Yep.

dbrock

16-12-2007 22:27:52

Your the man.