In an overlap query, we determine whether geometry has collided or overlapped against any other body in a PhysX scene; if an overlap is reported, we can also find the information about the overlapping object. The methods are similar to raycast()
and sweep()
except that it doesn't support PxHitFlags
, because there's no specific first point from where the overlap occurs. The supported shapes are box, sphere, capsule, and convex.
In PhysX, overlap queries are done by calling the PxScene::overlap()
function, and it can be used in different modes depending on the arguments you are passing to the function; they are described as follows:
overlap()
withPxOverlapBuffer buf
andPxQueryFlag::eANY_HIT
overlap()
withPxOverlapBuffer buf(PxOverlapBuffer, PxU32)
The overlap()
function with PxOverlapBuffer buf
and PxQueryFlag::eANY_HIT
just returns true
if the shape volume is overlapped by any other PhysX actor. The function has four parameters. The first one is of PxGeometry
type, and...