InputGetAccelerometer Method |
Returns the acceleration of the device's accelerometer sensor, if the device has one. Otherwise, the method returns .
Note this method returns an empty Vector3 when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer.
Note: This method only works on iOS, Android, and UWP. On other platforms, it always returns . On Android the unit of measurement for each axis is m/s² while on iOS and UWP it's a multiple of the Earth's gravitational acceleration g (~9.81 m/s²).
Namespace: Godot
public static Vector3 GetAccelerometer()
[Missing <returns> documentation for "M:Godot.Input.GetAccelerometer"]