On Trigger

Emits an event when a collider enters or leaves the volume of a Trigger.

On Trigger Node

The On Trigger Node is an Event Node that can be used as source of events in ActionGraph.

It’s a Scene Node so it needs stepping simulation in order to be used.

The node will be listening for all trigger collider Enter or Leave events on the specified input paths, including both paths from the trigger relationships input and from the trigger paths array input. Optionally the node can be flagged to listen to all triggers happening on current stage. The Enter execution output will be activated when colliders are entering the trigger volume. The Leave execution output will be activated when colliders are leaving the trigger volume. Both execution outputs can be connected at the same time for a given node.

Important

The prims that are setup as inputs to this node MUST have Collider in addition to the TriggerAPI or to the TriggerStateAPI applied to it, otherwise no trigger notification will get generated. TriggerAPI can be applied anywhere a ColliderAPI is already applied (the physics add menu is selection context sensitive). For example select an existing Mesh or Shape on the stage, right click on it and then Add –> Physics –> Collider and after that again right click –> Add –> Physics –> Trigger

Installation

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

Inputs

Name

Type

Description

Default

Triggers Relationships (triggersRelationships)

bundle

Specify one or more Prims with an applied TriggerAPI to monitor their trigger events

Triggers Paths (triggersPaths)

token[]

Specify one or more paths to Prims with applied TriggerAPI to monitor their trigger events

Listen To All Triggers (listenToAllTriggers)

bool

If True the node will trigger whenever a trigger events happens, ignoring the list of provided paths in Triggers Relationships and Triggers Paths

Outputs

Name

Type

Description

Default

enterExecOut

execution

Output execution when enter event is emitted

leaveExecOut

execution

Output execution when leave event is emitted

Trigger Collider (triggerCollider)

token

Path of Collider Prim containing the TriggerAPI that has emitted the trigger event. It will not be updated if none of the two execution pins are wired.

Other Collider (otherCollider)

token

Path of the Collider Prim that has entered the volume of the Collider Prim marked as trigger. It will not be updated if none of the two execution pins are wired.

Trigger Body (triggerBody)

token

Path of Body containing Collider Prim that has emitted the trigger event. It will not be updated if none of the two execution pins are wired.

Other Body (otherBody)

token

Path of Body containing the Collider Prim that has entered the volume of the Collider Prim marked as trigger. It will not be updated if none of the two execution pins are wired.

Demos

Several demo scenes can be accessed through the physics demo scenes menu option (Window > Simulation > Physics / Demo Scenes).

This will enable a Physics Demo Scenes window, which has a Triggers Samples section.

../../../../_images/kit_physics_demo_scenes.png

A simple demo is labeled Trigger Shape Sorting.

../../../../_images/omnigraph-physx-trigger-demo-shape-sorting.png

A more complex demo using the trigger nodes is labeled Trigger Conveyor.

../../../../_images/omnigraph-physx-trigger-demo-conveyor.png