Critter::Body Bounding Box problem

lordmonkey

23-04-2011 12:04:28

Hello,
I have made myself a simple model and exported it into .mesh format and then successfully imported it into Ogre. But when I want to show its bounding box i have some problems. I use the code shown below :
// Setup a BodyDescription.
Critter::BodyDescription bodyDescription;
bodyDescription.mMass = 100.0f; // Set the mass to 40kg.
NxOgre::CapsuleDescription capsDescription = NxOgre::CapsuleDescription(10, 20);

mBody = mRenderSystem->createBody(capsDescription , NxOgre::Matrix44::IDENTITY, "dominik1_t.mesh", bodyDescription);
mBody->setGlobalPosition(0,50,0);
mBody->getNode()->setScale(1);
mBody->getNode()->getSceneNode()->showBoundingBox(true);


After using this code the bounding box is perfectly attached to the model (it rotates and scales like it should) but it does not work with the NxOgre's collision detection - NxOgre uses in this case the capsule description i have defined. What am I doing wrong here ?

As on the attached picture : the model is floating (because the defined capsule description is too big for the model but anyway it does not match with the bounding box volume shown)