Skip to main content
Pan Trigger

A single or continuous trigger that fires when the user pans across an object.

Updated over a week ago

Overview

Pan triggers fire when the user moves their finger across an object. Pan triggers can fire once when the pan begins, continuously while the user pans, or once when the pan gesture ends.


Trigger Properties

State

Set the trigger to fire when the pan begins, as the pan changes, or when the pan ends:

  • Began: Fires once when the user begins a pan gesture within the boundary.

  • While Panning: Fires continuously as the user moves their finger.

  • Ended: Fires once when the user stops panning.

Direction

Set if the trigger should fire when the user pans Up, Down, Left, Right, Up & Down, Right & Left, or in any direction.


Is Enabled

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


Expression Editor Properties

Delta X

trigger.deltaX

Distance your finger moves horizontally from A to B.

Delta Y

trigger.deltaY

Distance your finger moves vertically from A to B.

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.

Translation X

trigger.translationX

Horizontal distance of the pan: Left (-) and Right (+).

Translation Y

trigger.translationY

Vertical distance of the pan: Left (-) and Right (+).

Velocity X

trigger.translationX

Horizontal velocity of your finger while panning.

Velocity Y

trigger.translationY

Vertical velocity of your finger while panning.

Translation Percent X

trigger.translationX

Percent based on the distance the user pans horizontally within the boundary of the object the trigger is on. This is a 0 - 1 value.

Translation Percent Y

trigger.translationY

Percent based on the distance the user pans vertically within the boundary of the object the trigger is on. This is a 0 - 1 value.

Is Enabled

trigger.isEnabled

Whether the trigger is enabled or disabled.


Resources

Projects

Videos

Did this answer your question?