Joystick:getSensorData
Available since LÖVE 12.0 |
This callback is not supported in earlier versions. |
Gets the latest data for the given sensor type for this Joystick.
The returned values have meaning based on the sensor type, for example an accelerometer will return acceleration values along each axis.
If the sensor was not enabled via Joystick:setSensorEnabled, this function may cause an error.
Function
Synopsis
x, y, z = Joystick:getSensorData( sensorType )
Arguments
SensorType sensorType
- The type of sensor.
Returns
number x
- The sensor's current 1st value.
number y
- The sensor's current 2nd value.
number z
- The sensor's current 3rd value.
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