Physx-3.3 and CCD

Been having issues with CCD in PhysX-3.3 and wanted to know if the eDETECT_CCD_CONTACT and eDETECT_DISCRETE_CONTACT are mutually exclusive. With CCD enable on my rigid bodies, I’m able to see the contact in PVD, however, if I modify the PxPairFlags in the filter shader by adding eDETECT_CCD_CONTACT | eSOLVE_CONTACT, contacts do not get resolved and the rigid body just passes through the collided object.

The flag eDETECT_CCD_CONTACT permits CCD to generate contacts but it is not guaranteed that CCD will always generate contacts. CCD also filters pairs based on relative velocity so that objects that are moving sufficiently slowly relative to each other that discrete simulation should not miss contacts will not incur additional overhead when CCD is enabled. This means that you would need to have both eDETECT_CCD_CONTACT and eDETECT_DISCRETE_CONTACT enabled to stop the objects from passing through each-other.

The flags are mutually exclusive so that you can potentially do things like use separate shapes for CCD and discrete collision detection. This may be useful if you want to use a complex shape or set of shapes for discrete simulation and you just want a coarse representation for CCD.

Hope this helps

Kier

Thanks, I’ll try that an see if it works.