O'Reilly logo

Learning Physics Modeling with PhysX by Krishna Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Overlap queries

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() with PxOverlapBuffer buf and PxQueryFlag::eANY_HIT
  • overlap() with PxOverlapBuffer buf(PxOverlapBuffer, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required