diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/os/input.cpp | 1 | ||||
| -rw-r--r-- | core/os/input.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index 3ccb57cd4..07d351e91 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -68,6 +68,7 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string); ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0)); ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration); + ObjectTypeDB::bind_method(_MD("get_gravity"),&Input::get_gravity); ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer); ObjectTypeDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer); ObjectTypeDB::bind_method(_MD("get_gyroscope"),&Input::get_gyroscope); diff --git a/core/os/input.h b/core/os/input.h index 582729a78..aaea50b78 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -80,6 +80,7 @@ public: virtual void warp_mouse_pos(const Vector2& p_to)=0; + virtual Vector3 get_gravity()=0; virtual Vector3 get_accelerometer()=0; virtual Vector3 get_magnetometer()=0; virtual Vector3 get_gyroscope()=0; |
