Gesture.MultiTouch.Event

The Gesture.MultiTouch.Event value type represents a touch event.

A touch event consists of one or more touch points, each one representing a finger touching the screen. A new touch event is created each time the user presses, releases or moves a touch point.

The event's phase property indicates whether the event was created due to touch points being pressed, released or moved. Distinct touch phases always cause multiple events. For example, if a point is pressed and then moved, you will receieve two events - one event for the press and a second event for the move.

If the user performs the same action simultaneously with multiple fingers, it will only cause a single event. For example, if the user touches two fingers to the screen simultaneously, you will receive a single event with the phase Press. Likewise if more than one finger is moved or released simultaneously.

property Gesture.MultiTouch.Event.Phase phaseread only

The event phase.

Gesture.MultiTouch.Event.Phase.Press

One or more touch points were pressed.

You can identify the specific points that were pressed as they will also be in the Press phase.

Gesture.MultiTouch.Event.Phase.Move

One or more touch points moved.

You can identify the specific points that moved as they will also be in the Move phase.

Gesture.MultiTouch.Event.Phase.Release

One or more touch points were released.

You can identify the specific points that were released as they will be in the Release phase.

Gesture.MultiTouch.Event.Phase.Stationary

The Stationary phase is a special phase used to indicate that a specific touch point in the event hasn't changed since the previous event.

An event created by Gesture.MultiTouch will never have a Stationary phase.

property Array<Gesture.MultiTouch.Point> pointsread only

property Float timestampread only

The time, in seconds, the event was generated.

property Vec2 centroidread only

The centroid for all the current touch points. The centroid is the average of all the touch points.

function ignorePoint(Int index)