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

Sweep queries

Sweep queries are just like the raycast queries, but the only difference is that sweep queries cast a shape or you can say sweep a shape instead of a ray. As with raycast, in PhysX the PxScene::sweep() function is used to perform sweep queries and can be used in many different modes; they are as follows:

  • sweep() with PxSweepBuffer buf and PxQueryFlag::eANY_HIT
  • sweep() with PxSweepBuffer buf and a default constructor
  • sweep() with PxSweepBuffer buf(PxSweepBuffer, PxU32)

The geometry required by the sweep function can be a box, sphere, capsule, or convex.

The sweep function sweeps all of the specified geometry objects through space, and finds all of the rigid actors that get hit during the sweep. Each successful collision between a sweep ...

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