On Contact Event, Advanced#

PhysX contact event triggered execution.

Allows triggering other ActionGraph nodes whenever two physics bodies either come, remain or cease to be in contact.

Note

This node is based on PhysX Contact Events. For contact between the input body prims and other prims to trigger, the following conditions must be met:

  • Both prims must be physics bodies with colliders.

  • At least one of the two must have the Contact Reporter API applied. Notice however that it does not have to be the physics body specified on the node that carries the API.

  • Simulation must be active.

Installation#

To use this Node, you must enable omni.physx.graph in the Extension Manager.

Inputs#

Name

Type

Description

Default

Body Paths (bodyPaths)

token[]

Body prim paths to check against.

Body Prims (targetBodies)

bundle

Body prims to check against.

Outputs#

Name

Type

Description

Default

foundExecOut

execution

Output execution trigger for contact found events. Note that the node only evaluates and triggers for contact events where one of the bodies have the Contact Report API applied.

persistsExecOut

execution

Output execution trigger for contact persists events. Note that the node only evaluates and triggers for contact events where one of the bodies have the Contact Report API applied.

lostExecOut

execution

Output execution trigger for contact lost events. Note that the node only evaluates and triggers for contact events where one of the bodies have the Contact Report API applied.

Contacting Body (contactingBody)

token

Path of the physics body that came in contact with a node input body to trigger the contact event.

Input Body (inputBody)

token

Path of the node input physics body that triggered the contact event.

Contacting Collider (contactingCollider)

token

Path to the collider of the contacting physics body.

Input Body Collider (inputBodyCollider)

token

Path to the collider of the input body.

Contacting Faces (contactingFaces)

int[]

Contact face indexes for the contacting collider.

Input Body Faces (inputBodyFaces)

int[]

Contact face indexes for the input body collider.

Contacting Materials (contactingMaterials)

int[]

Contact material indexes for the contacting collider.

Input Body Materials (inputBodyMaterials)

int[]

Contact material indexes for input body collider.

Points (contactPoints)

pointf[3][]

Contact point positions.

Normals (contactNormals)

normalf[3][]

Contact point normals.

Depths (contactDepths)

float[]

Contact point depths.

Impulses (contactImpulses)

vectorf[3][]

Contact point impulses.

Note

The “input body” outputs will tell you which of the physics bodies input triggered the node execution. If you only specify a single physics body input, this will always also be the inputBody output.

For an example of concrete use of contact event nodes within an ActionGraph, see the OmniGraph demo in the physics demo scenes under Contacts.