diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-01-15 00:08:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-15 00:08:46 +0100 |
commit | d4eb8ec884c0519dc02de4451e249f6f5cca962a (patch) | |
tree | f0fe3497f7bbba49de5e938000ca463101b6c50c /core/os | |
parent | dab73c701a9785be443977a613e57600d1e136c8 (diff) | |
parent | 5e4dcb3b7f93cfe19a5c12700df5a7c82045f37c (diff) |
Merge pull request #7127 from BastiaanOlij/ios_meters
Core motion implementation for iPhone (Accelerometer/Gyro/Magnetometer support)
Diffstat (limited to 'core/os')
-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 acfd5ba540..e53aa82b13 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -70,6 +70,7 @@ void Input::_bind_methods() { ClassDB::bind_method(_MD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string); ClassDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0)); ClassDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration); + ClassDB::bind_method(_MD("get_gravity"),&Input::get_gravity); ClassDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer); ClassDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer); ClassDB::bind_method(_MD("get_gyroscope"),&Input::get_gyroscope); diff --git a/core/os/input.h b/core/os/input.h index a1b60ba0c8..82c7a80d3f 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -82,6 +82,7 @@ public: virtual void warp_mouse_pos(const Vector2& p_to)=0; + virtual Vector3 get_gravity() const=0; virtual Vector3 get_accelerometer() const=0; virtual Vector3 get_magnetometer() const=0; virtual Vector3 get_gyroscope() const=0; |