ghiboz
16-05-2007 09:40:23
hi! I have a trimesh and for the moment I wish have as collision shape a box around my trimesh!
here is my code:
but doesn't work, the body have as collision shape the box 10x10x10 and not the newest that I added (is biggest than 10x10x10)
how can I do??
last thing:
the mass in what measure unit is??
regards!
here is my code:
NxOgre::Body *body = pScene->createBody(pszFileName,
new NxOgre::CubeShape( 10, 10, 10 ),
NxOgre::Pose(pos + gain, rot),
pars);
Vector3 bodyMax = body->getEntity()->getBoundingBox().getMaximum();
Vector3 bodyMin = body->getEntity()->getBoundingBox().getMinimum();
Vector3 bodyDim = bodyMax - bodyMin;
body->addShape(new NxOgre::CubeShape(bodyDim.x, bodyDim.y, bodyDim.z));
but doesn't work, the body have as collision shape the box 10x10x10 and not the newest that I added (is biggest than 10x10x10)
how can I do??
last thing:
the mass in what measure unit is??
regards!