Added gyroscope support to Godot and Android
This commit is contained in:
parent
4c4ab140b4
commit
370ae3512d
12 changed files with 73 additions and 1 deletions
|
|
@ -66,6 +66,7 @@ void Input::_bind_methods() {
|
|||
ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);
|
||||
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);
|
||||
//ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want
|
||||
ObjectTypeDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed);
|
||||
ObjectTypeDB::bind_method(_MD("get_mouse_button_mask"),&Input::get_mouse_button_mask);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ public:
|
|||
|
||||
virtual Vector3 get_accelerometer()=0;
|
||||
virtual Vector3 get_magnetometer()=0;
|
||||
virtual Vector3 get_gyroscope()=0;
|
||||
|
||||
virtual void action_press(const StringName& p_action)=0;
|
||||
virtual void action_release(const StringName& p_action)=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue