TriggerRegion Events

Studio

TriggerRegion Events

A TriggerRegion event is an event that is fired as a result of a Z.Object node interacting with the area defined by a Z.TriggerRegion that has the same tag as the TriggerRegion's triggerTag.

There are seven TriggerRegion events that are split between the TriggerRegion node itself, and the interacting Z.Object node. They are as follows:

Event Node Description
triggerenter Z.TriggerRegion When the origin point of an object first enters the TriggerRegion.
triggerleave Z.TriggerRegion When the origin point of an object leaves the TriggerRegion.
triggermove Z.TriggerRegion Every frame the origin point of an object moves inside the TriggerRegion.
triggers Z.TriggerRegion Once a frame, with data for every object currently inside the TriggerRegion.
triggerenter Z.Object When the origin point of the object first enters a TriggerRegion.
triggerleave Z.Object When the origin point of the object leaves a TriggerRegion.
triggermove Z.Object Every frame the origin point of the object moves inside a TriggerRegion.

All the of the events pass either a TriggerEvent or TriggerPresentEvent argument to attached handler functions, providing further information on the interaction.

Open in new window