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

Trigger shapes

All shapes that can be created in PhysX can be flagged as a trigger shape. A trigger shape doesn't participate in the simulation, but can be configured to participate in scene queries. Its shape doesn't involve any physical collision. A trigger shape is mainly used to detect if any rigid body overlapped its spatial volume or not. If yes, it triggers a callback function. This feature is frequently used in games. For example, let's say you are making a sci-fi game in which whenever a player comes in front of any door, it is automatically opened for the player. To do this, simply place an actor with a cube shape in front of the door and flag it as triggerShape. Then write a game logic that plays the door opening animation whenever ...

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