I have a triangle mesh and a sphere. I set the contact offset on both to 5mm. The sphere radius is 1mm, while the mesh is 2 orders of magnitude larger. I start with the sphere far away from the triangle mesh and move the sphere iteratively (setGlobalPose() followed by setKinematicTarget()) towards the mesh. When the distance between the mesh and the sphere falls below 10mm I start to get a single contact, which behaves exactly as expected - the normal points correctly, and the separation is what I’d expect, and it decreases by the same amount that I move the sphere. When the sphere overlaps the mesh boundary I still get a contact, and a negative separation < 1mm. But as soon as the sphere crosses the mesh boundary “into the mesh” (i.e. it’s on the “inner” side of the mesh - the one with surface normals pointing away from), and it’s fully contained in the mesh, there are no more contacts reported. How can I make PhysX report contacts even when the mesh “contains” the sphere?
Hi there @yarospo, nice to read you again.
Which version of PhysX are you using here? The latest version (v5) is part of Omniverse, and there I would refer to “Advanced Collision detection” which also discusses object inclusion. (The same topic is also discussed in v4.1)
Another option might be to try Persistent Contact Manifold (PCM) as an alternative collision detection type using distance only as a basis (documentation for version 5 and version 4.1 respectively).
But don’t hold me to it, I am not a resident PhysX expert.
If you are using Omniverse, you might want to check out their corner of this Server.
Thanks!