- Source
Example
// Check if a touch is currently active
TouchInput.IsTouchActive(0);
// Get the position of the first touch
TouchInput.GetTouch(0);
Methods
(static) GetTouch(index) → {Vector2}
Get the position of the touch at the given index.
Parameters:
Name | Type | Description |
---|---|---|
index | number | The index of the touch to get the position of. |
- Source
Returns:
The position of the touch at the given index.
- Type:
- Vector2
(static) GetTouchCount() → {number}
Get the number of active touches.
- Source
Returns:
The number of active touches.
- Type:
- number
(static) IsTouchActive(index) → {boolean}
Check if a touch is currently active.
Parameters:
Name | Type | Description |
---|---|---|
index | number | The index of the touch to check. |
- Source
Returns:
True if the touch at the given index is active.
- Type:
- boolean