[Solved]How to reset scene node position?

larnya

04-11-2010 08:24:47

I created a Critter::Body in a box, size (1,2,1), with a ninja mesh scaled (0.01,0.01,0.01).
Critter::BodyDescription bodyDsc;
bodyDsc.mMass = 40;
bodyDsc.mName = "Ninja";
mBody = mNxRenderSys->createBody(NxOgre::BoxDescription(1, 2, 1), pos, "ninja.mesh", bodyDsc);
Ogre::SceneNode* node = mBody->getSceneNode();
node->scale(0.01, 0.01, 0.01);
node->translate(Ogre::Vector3(0, -1, 0));

But the position of ninja seems not correct, he stands in the air !? Just like the pic shows bellow.


It's very strange that SCALE transform works, but TRANSLATE didn't !

I've tried to transform the ninja mesh directly whith MeshMagick, but another problem came. Please look at the pic shows bellow.

Well, I put the MeshMagick tool under the flour folder, so that I can process meshs in one time.
I've searched the reasons of Warnning for a long time, but nothing can help me out.

Somebody can help? Any suggestion would be appreciated. :)
Thx.

larnya

06-11-2010 01:13:59

The reason why I got warnings is that my mesh is too new.
I download the ninja.mesh and ninja.skeleton from Ogre v1.6.3, then transform mesh with MeshMagick.
Now it works! :D