PxScene::overlap seems to always return true.
I’ve tried the example from ‘SampleCCTActor’ (inside the ‘tryStandup’ method) in my own application:
physx::PxCapsuleController *controller = static_cast<physx::PxCapsuleController*>(physController->GetController());
physx::PxScene *scene = controller->getScene();
physx::PxSceneReadLock scopedLock(*scene);
physx::PxCapsuleGeometry geom(1,1); // Radius and height = 1, just for testing
physx::PxVec3 pos(0,0,0);
physx::PxQuat orientation(physx::PxHalfPi,physx::PxVec3(0.0f,0.0f,1.0f));
physx::PxOverlapBuffer hit;
if(scene->overlap(geom,physx::PxTransform(pos,orientation),hit,physx::PxQueryFilterData(physx::PxQueryFlag::eANY_HIT)));
{
Con::cerr<<"getNbAnyHits: "<<hit.getNbAnyHits()<<Con::endl;
Con::cerr<<"getNbTouches: "<<hit.getNbTouches()<<Con::endl;
Con::cerr<<"hasBlock: "<<hit.hasBlock<<Con::endl;
return false;
}
The output is:
getNbAnyHits: 0
getNbTouches: 0
hasBlock: 0
And to verify it through the PVD, there is definitely nothing at that location that could cause an overlap:
So why is it returning true nonetheless? Am I missing something?