Window.getTouchVelocity

Function/Meaning

Get touch coordinate movement speed

Type
Windowclassmethod of
Syntax
getTouchVelocity(id, x, y, speed)
Arguments
id

Specify Touch ID.

x

Returns the mouse coordinate movement speed in the X-axis direction.

y

Returns the mouse coordinate movement speed in the Y-axis direction.

speed

The mouse coordinate movement speed is returned.

Return value

Returns whether the acquisition was successful or unsuccessful

Explanation

Get the current touch movement speed in pixel / sec.
It is measured from the time it is pressed until it is released.
Since it supports multi-touch, the speed is measured for each ID.
Note that the measured speed information disappears when the method call of the Window.onTouchUp event ends.

Reference
Window.getMouseVelocity