No collision between Actors, why?

zhucde

13-08-2010 09:21:36

the two actor are all created by TriangleMesh(Shape), by following code:


NxOgre::Resources::Mesh* mymesh = libFlour::BakeTriangleMesh(mSceneMgr, "robot.mesh");
NxOgre::Actor* a = mScene->createBody<Body>("robotmesh", new NxOgre::TriangleMesh(mymesh), NxOgre::Pose(0,0,0), ActorParams("gravity:yes"));

NxOgre::Resources::Mesh* mymesh2 = libFlour::BakeTriangleMesh(mSceneMgr, "ground.mesh");
NxOgre::Actor* a2 = mScene->createBody<Body>("robotmesh", new NxOgre::TriangleMesh(mymesh2), NxOgre::Pose(0,0,0), "static: yes");



but no collision between them , if changing Actor "a" with Convex(or cube...), it's all right ,
why?

betajaen

13-08-2010 09:25:01

TriangleMeshes don't collide with each other, and you can't use TriangleMeshes in anything but StaticGeometries.

It's all in the PhysX SDK documentation.

zhucde

13-08-2010 09:59:35

thanks!

you mean that, if i create a car, the car body shape can not the same as its real shape ? only can be created by cube, capsule , convex,..... ?

betajaen

13-08-2010 10:33:14

Basically yes, but you can use more than one shape in an Actor/Body to make up the parts of the car.

zhucde

18-08-2010 03:09:59

I see, thank you .