my car can run across another,why?

kidcdf

20-01-2008 06:26:45

carBody=NxScene->createBody(name+";"+filename, new NxOgre::TriangleMeshShape(filename), Vector3(0,0,0),"mass:1");

there is a static plane in the world,and my car can easily run on the plane,collision with plane

then I put several cars on the ground,and drive my car rush towards them,the miracle occured! My car run across them,why??

fzh

20-01-2008 07:03:02

If i'm not wrong, triangle mesh shape doesn't work with dynamic bodies.

kidcdf

20-01-2008 08:07:43

If i'm not wrong, triangle mesh shape doesn't work with dynamic bodies.
If triangle mesh shape doesn't work with dynamic bodies, how can I calculate the boundingbox size of ogre mesh?

fzh

20-01-2008 09:01:55

Ogre::AxisAlignedBox charAAB = mEntity->getBoundingBox();
Ogre::Vector3 min = charAAB.getMinimum();
Ogre::Vector3 max = charAAB.getMaximum();
Ogre::Vector3 center = charAAB.getCenter();
Ogre::Vector3 size( fabs( max.x - min.x), fabs( max.y - min.y), fabs( max.z - min.z ) );

then just use size.x, size.y and size.z in CubeShape.

kidcdf

20-01-2008 10:25:20

I use ConvexShapde(meshname),and the collision happens!

fzh

20-01-2008 10:30:44

yes convex shape works as well