Skip to main content
Touch Trigger

A single trigger that fires when a user touches an object.

Updated over 3 weeks ago

Overview

Touch triggers fire either when the user's finger touches the object or when the touch is released from the object. You can choose which state the trigger should fire.


Trigger Properties

State

Set the trigger to fire on Touch Down, Touch Up, or Any:

  • Touch Down: Fires when the user touches down inside the view’s boundary.

  • Touch Up: Fires when the user’s touch leaves the screen after touching down inside the view’s boundary.

  • Any: Fires on both Touch Up & Touch Down.

Number of Touches

Set how many fingers are required to fire the Touch trigger. Choose up to four fingers.

Is Enabled

Set if the trigger should fire when the trigger's conditions are met.


Expression Editor Properties

Location X

trigger.locationX

Horizontal location of your finger in relation to the object the trigger is on.

Location Y

trigger.locationY

Vertical location of your finger in relation to the object the trigger is on.

Number Of Touches

trigger.numberOfTouches

Number of fingers used to touch set on the trigger.

Is Enabled

trigger.isEnabled

Whether the trigger is enabled or disabled.


Resources

Projects

Tutorials

Did this answer your question?