Click or drag to resize

InputGetGravity Method

Returns the gravity of the device's accelerometer sensor, if the device has one. Otherwise, the method returns .

Note: This method only works on Android and iOS. On other platforms, it always returns . On Android the unit of measurement for each axis is m/s² while on iOS it's a multiple of the Earth's gravitational acceleration g (~9.81 m/s²).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static Vector3 GetGravity()

Return Value

Type: Vector3

[Missing <returns> documentation for "M:Godot.Input.GetGravity"]

See Also