Menu
Lumberyard
User Guide (Version 1.13)

Gestures Flow Graph Nodes

The Gestures Gem's flow graph nodes are contained in the Input, Gestures filter in the Flow Graph editor. Each node contains a number of input ports that you can use to configure how the gesture is recognized. Data is sent through output nodes each time the gesture is recognized (for discrete gestures such as tap or swipe), or for each frame while the gesture is being recognized (for continuous gestures such as drag, hold, pinch, and rotate).

You can use these flow graph nodes to configure gestures-related settings.

For more information on the Gestures Gem, see Gestures Gem.

ClickorTap

Recognizes a discrete (or series of discrete) click (or tap) gestures.

Inputs

Enable

Enables gesture recognizer.

Disable

Disables gesture recognizer.

PointerIndex

The pointer (button or finger) index to track.

Default value: 0

Type: Integer

MinClicksOrTaps

The minimum number of clicks or taps required for the gesture to be recognized.

Default value: 1

Type: Integer

MaxSecondsHeld

The maximum time in seconds a gesture can be held before the gesture stops being recognized.

Default value: .5

Type: Float

MaxPixelsMoved

The maximum distance in pixels allowed to move while being held before the gesture stops being recognized.

Default value: 20

Type: Float

MaxSecondsBetweenClicksOrTaps

The maximum time in seconds allowed between clicks or taps (only used when MinClicksOrTaps > 1).

Default value: .5

Type: Float

MaxPixelsBetweenClicksOrTaps

The maximum distance in pixels allowed between clicks or taps (only used when MinClicksOrTaps > 1).

Default value: 20

Type: Float

Outputs

Recognized

Activated when a discrete (or series of discrete) click (or tap) gestures is recognized.

StartX

Starting X screen position of the click or tap in pixels.

Type: Float

StartY

Starting Y screen position of the click or tap in pixels.

Type: Float

EndX

Final X screen position of the click or tap in pixels.

Type: Float

EndY

Final Y screen position of the click or tap in pixels.

Type: Float

Drag

Recognizes continuous drag gestures.

Inputs

Enable

Enables gesture recognizer.

Disable

Disables gesture recognizer.

PointerIndex

The pointer (button or finger) index to track.

Default value: 0

Type: Integer

MinSecondsHeld

The minimum time in seconds after the initial press before a drag is recognized.

Default value: 0

Type: Float

MinPixelsMoved

The minimum distance in pixels that must be dragged before a drag is recognized.

Default value: 20

Type: Float

Outputs

Recognized

Activated when a continuous drag gesture is initiated.

Updated

Activated when a continuous drag gesture is updated.

Ended

Activated when a continuous drag gesture is ended.

StartX

X pixel position where the drag started.

Type: Float

StartY

Y pixel position where the drag started.

Type: Float

CurrentX

Current X pixel position (or where the drag ended).

Type: Float

CurrentY

Current Y pixel position (or where the drag ended).

Type: Float

DeltaX

X pixels dragged (CurrentXStartX).

Type: Float

DeltaY

Y pixels dragged (CurrentYStartY).

Type: Float

Distance

Pixel distance from the drag's start position to its current (or end) position.

Type: Float

Hold

Recognizes continuous hold gestures.

Inputs

Enable

Enables gesture recognizer.

Disable

Disables gesture recognizer.

PointerIndex

The pointer (button or finger) index to track.

Default value: 0

Type: Integer

MinSecondsHeld

The minimum time in seconds after the initial press before a hold is recognized.

Default value: 2

Type: Float

MaxPixelsMoved

The maximum distance in pixels that can be moved before a hold stops being recognized.

Default value: 20

Type: Float

Outputs

Initiated

Activated when a continuous hold gesture is initiated.

Updated

Activated when a continuous hold gesture is updated.

Ended

Activated when a continuous hold gesture is ended.

StartX

X pixel position where the hold started.

Type: Float

StartY

Y pixel position where the hold started.

Type: Float

CurrentX

X pixel position where the hold is currently (or where it ended).

Type: Float

CurrentY

Y pixel position where the hold is currently (or where it ended).

Type: Float

Duration

Duration of the hold in seconds.

Type: Float

Pinch

Recognizes continuous pinch gestures (the primary and secondary touches moving towards or away from each other).

Inputs

Enable

Enables gesture recognizer.

Disable

Disables gesture recognizer.

MinPixelsMoved

The minimum distance in pixels that must be pinched before a pinch is recognized.

Default value: 50

Type: Float

MaxAngleDegrees

The maximum angle in degrees that a pinch can deviate before it is recognized.

Default value: 15

Type: Float

Outputs

Initiated

Activated when a continuous pinch gesture is initiated.

Updated

Activated when a continuous pinch gesture is updated.

Ended

Activated when a continuous pinch gesture is ended.

StartMidpointX

X pixel position (midpoint) where the pinch started.

Type: Float

StartMidpointY

Y pixel position (midpoint) where the pinch started.

Type: Float

StartDistance

Pixel distance between the two touch positions when the pinch started.

Type: Float

CurrentMidpointX

Current X pixel position (midpoint) of the pinch (or where it ended).

Type: Float

CurrentMidpointY

Current Y pixel position (midpoint) of the pinch (or where it ended).

Type: Float

CurrentDistance

Current pixel distance between the two touch positions (or when the pinch ended).

Type: Float

Ratio

The ratio of the pinch (CurrentDistance / StartDistance).

Type: Float

Rotate

Recognizes continuous rotate gestures (the primary and/or secondary touches moving in a circular motion around the other).

Inputs

Enable

Enables gesture recognizer.

Disable

Disables gesture recognizer.

MaxPixelsMoved

The maximum distance in pixels that the touches can move toward or away from each other before a rotate is recognized.

Default value: 50

Type: Float

MinAngleDegrees

The minimum angle in degrees that must be rotated before the gesture is recognized.

Default value: 15

Type: Float

Outputs

Initiated

Activated when a continuous rotate gesture is initiated.

Updated

Activated when a continuous rotate gesture is updated.

Ended

Activated when a continuous rotate gesture is ended.

StartMidpointX

X pixel position (midpoint) where the rotate started.

Type: Float

StartMidpointY

Y pixel position (midpoint) where the rotate started.

Type: Float

StartDistance

Pixel distance between the two touch positions when the rotate started.

Type: Float

CurrentMidpointX

Current X pixel position (midpoint) of the rotate (or where it ended).

Type: Float

CurrentMidpointY

Current Y pixel position (midpoint) of the rotate (or where it ended).

Type: Float

CurrentDistance

Pixel distance between the two touch positions currently (or when the rotate ended).

Type: Float

RotationDegrees

The current rotation in degrees in the range [-180, 180].

Type: Float

Swipe

Recognizes discrete swipe gestures.

Inputs

Enable

Enables gesture recognizer.

Disable

Disables gesture recognizer.

PointerIndex

The pointer (button or finger) index to track.

Default value: 0

Type: Integer

MaxSecondsHeld

The maximum time in seconds after the initial press for a swipe to be recognized.

Default value: .5

Type: Float

MinPixelsMoved

The minimum distance in pixels that must be moved before a swipe is recognized.

Default value: 100

Type: Float

Outputs

Recognized

Activated when a discrete swipe gesture is recognized.

StartX

X pixel position where the swipe started.

Type: Float

StartY

Y pixel position where the swipe started.

Type: Float

EndX

X pixel position where the swipe ended.

Type: Float

EndY

Y pixel position where the swipe ended.

Type: Float

DeltaX

X pixels swiped (EndXStartX)

Type: Float

DeltaY

Y pixels swiped (EndYStartY).

Type: Float

DirectionX

X direction of the swipe (normalized DeltaX, DeltaY).

Type: Float

DirectionY

Y direction of the swipe (normalized DeltaX, DeltaY).

Type: Float

Distance

Distance of the swipe in pixels.

Type: Float

Duration

Duration of the swipe in seconds.

Type: Float

Velocity

Velocity of the swipe in pixels per second.

Type: Float