1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

Added gyroscope support to Godot and Android

This commit is contained in:
Jamil Halabi
2016-07-15 15:31:34 +08:00
parent 4c4ab140b4
commit 370ae3512d
12 changed files with 73 additions and 1 deletions

View File

@@ -259,6 +259,12 @@ Vector3 InputDefault::get_magnetometer() {
return magnetometer;
}
Vector3 InputDefault::get_gyroscope() {
_THREAD_SAFE_METHOD_
return gyroscope;
}
void InputDefault::parse_input_event(const InputEvent& p_event) {
_THREAD_SAFE_METHOD_
@@ -386,6 +392,14 @@ void InputDefault::set_magnetometer(const Vector3& p_magnetometer) {
}
void InputDefault::set_gyroscope(const Vector3& p_gyroscope) {
_THREAD_SAFE_METHOD_
gyroscope=p_gyroscope;
}
void InputDefault::set_main_loop(MainLoop *p_main_loop) {
main_loop=p_main_loop;