I’m having problems getting the overlapAny() query to work in the latest PhysX 3.2.2. When using Convex geometry PhysX just crashes during the overlapAny() call. If I use Box geometry there’s no crash but no collisions are ever detected even though 2 actors are clearly intersecting.
Here’s the code I’m using. Can anyone tell if I’m doing anything wrong?
PxRigidActor * rigidActor = (PxRigidActor*)pBody->component->userData;
if( !rigidActor ) return false;
PxU32 shapeCount = rigidActor->getNbShapes();
PxShape** shapes = new PxShape*[shapeCount];
rigidActor->getShapes(shapes, shapeCount);
for( PxU32 i = 0; i < shapeCount; i++ )
{
PxShape* shape = shapes[i];
PxGeometry geometry = shape->getGeometry().any();
PxTransform pose = PxShapeExt::getGlobalPose(*shape);
if( pose.isFinite() )
{
PxShape* hit;
if( pxScene_->overlapAny(geometry, pose, hit) )
return true;
}