On Trigger
The On Trigger event node start to trigger when a GameObject enter in the trigger of the GameObject containing the visual script with the On Trigger event. From there, it will execute anything chained to its control flow ports depending of the execution context you want to use.
Note: To get the On Trigger event work when working in a scene level, you absolutely need to setup your GameObjects like this: 1- The object with the visual script containing the On Trigger Event node.
- Component: Convert To Entity.
- Component: Physics Shape or Any collider with Is Trigger checked.
- Component: Scripting Graph Authoring (Script) with our visual Script containing the On Trigger Event. 2- The GameObject that will Enter in the trigger.:
- Component: Convert To Entity.
- Component: Physics Shape or any Collider.
Ports
Inputs
Port Name | Type | Default Value | Description |
---|---|---|---|
[Boolean] | True | If Enabled is set to true (Checked), the On Trigger Event will be triggered every time a GameObject enter the trigger, exit the trigger or is inside of the trigger.Instance | |
[GameObject] | The GameObject you want to validate that is colliding with the GameObject containing this visual script. |
Outputs
Port Name | Type | Default Value | Description |
---|---|---|---|
Trigger | Execute next action when a GameObject enter in the trigger of the GameObject containing the visual script. | ||
Trigger | Execute next action when a GameObject exit the trigger of the GameObject containing the visual script. | ||
Trigger | Execute every frame when a GameObject as entered in the trigger of the GameObject containing the visual script and is inside it. | ||
[GameObject] | Return the GameObject interacting with the Trigger. |