PhysxTriggerAPI#

Marks a collision shape as a trigger volume. The API declares no properties: its presence in usd-schemas is the whole signal. The shape is created with PxShapeFlag::eTRIGGER_SHAPE set (to physics:collisionEnabled) and eSIMULATION_SHAPE and eSCENE_QUERY_SHAPE cleared.

  • Applies to: Gprim

  • Requires on the same prim: PhysicsCollisionAPI

  • Read only when listed in usd-schemas.

What USD population writes#

The API has no attributes or relationships, so the producer publishes only its token in usd-schemas. Nothing else changes on the row.

Interactions#

  • PhysicsCollisionAPI: parseCollisionExt sets PhysxShapeDesc::isTrigger = true when this API is in usd-schemas (the flag is only ever set, never cleared). At shape creation the consumer then sets eSIMULATION_SHAPE false, eTRIGGER_SHAPE = desc.collisionEnabled, eSCENE_QUERY_SHAPE false. Verification of a trigger prim: shape->getFlags().isSet(::physx::PxShapeFlag::eTRIGGER_SHAPE) is true and isSet(eSIMULATION_SHAPE) is false; the contract can attach this only to a column, and this API owns none.

  • PhysicsMeshCollisionAPI: A trigger on a triangle-mesh shape (approximation none, meshSimplification or sdf on a static or kinematic body) is refused: the consumer logs a warning and creates a regular collision shape instead.

  • PhysxTriggerStateAPI: When PhysxTriggerStateAPI is also applied, isTriggerUsdOutput is set as well and the trigger manager writes physxTrigger:triggeredCollisions back to a USD stage; on a stage-less ovstage attach preloadTrigger is a no-op.

Notes#

  • The generated tests cannot verify this API because verify blocks hang on columns and the API has none; the expected observation on a trigger collider is shape->getFlags().isSet(::physx::PxShapeFlag::eTRIGGER_SHAPE) == true.

  • Because eTRIGGER_SHAPE is set to physics:collisionEnabled, a trigger whose collider is disabled has neither the simulation nor the trigger flag.