Contact Reports

jonmiller

09-06-2009 19:09:36

I'm having trouble understanding what the source of my problem is. What I need to do is detect a collision with my land mass and the ship that I'm driving around. I was creating a convex mesh using the geometry of the hull for the ship and the land mass, but the land was not very detailed as i'm restricted to 256 polys. With that setup I was able to drive the ship around but it just slid across the land mass, so I used a contact report to let me know when the two touched and I could freeze the ships position. When I tried to cook a triangle mesh instead of convex, i just go through the land and it doesn't register and contact reports. Any idea what might be causing this or a different technique to get what I need? I could simply put an invisible wall around the landmass, but this is for training and I'd rather cause the app to lock the ship in place until the instructor can release them.

jonmiller

09-06-2009 20:23:14

So I figured out what the problem was, finally. It clearly states in the PhysX documentation that TriangleMeshShape to TriangleMeshShape will not generate a collision response or contact report. So once I changed my land to be a TriangleMeshShape and my ship to be a ConvexMeshShape it worked out just fine.