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

Chapter 6. Scene Queries

In this chapter we will learn about the various types of scene queries and their mode of operations.

Topics that are covered in this chapter are as follows:

  • Raycast queries and its mode of operation
  • Sweep queries and its mode of operation
  • Overlap queries and its mode of operation

Raycast queries

The raycast query is a way to detect collisions by using rays, just like how we use the laser pointing device during any slide show presentation, which creates a red dot on the first object its ray collides with. Raycast queries have many uses, such as detecting bullet collision point in an FPS game, checking line of sight for the enemy characters, and selecting in-game objects by using a mouse.

In PhysX, raycasting is done by calling ...

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