love.touch.getPosition
Available since LÖVE 0.10.0 |
This function is not supported in earlier versions. |
Gets the current position of the specified touch-press, in pixels.
Function
Synopsis
x, y = love.touch.getPosition( id )
Arguments
userdata id
- The identifier of the touch-press. Use love.touch.getTouches, love.touchpressed, or love.touchmoved to obtain touch id values.
Returns
number x
- The position along the x-axis of the touch-press inside the window, in pixels.
number y
- The position along the y-axis of the touch-press inside the window, in pixels.
Notes
The unofficial Android and iOS ports of LÖVE 0.9.2 reported touch-press positions as normalized values in the range of [0, 1], whereas this API reports positions in pixels.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info