You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Core motion for Godot 2.x (based on PR 7127)
This commit is contained in:
@@ -247,6 +247,12 @@ void InputDefault::joy_connection_changed(int p_idx, bool p_connected, String p_
|
||||
emit_signal("joy_connection_changed", p_idx, p_connected);
|
||||
};
|
||||
|
||||
Vector3 InputDefault::get_gravity() {
|
||||
|
||||
_THREAD_SAFE_METHOD_
|
||||
return gravity;
|
||||
}
|
||||
|
||||
Vector3 InputDefault::get_accelerometer() {
|
||||
|
||||
_THREAD_SAFE_METHOD_
|
||||
@@ -376,6 +382,14 @@ void InputDefault::stop_joy_vibration(int p_device) {
|
||||
joy_vibration[p_device] = vibration;
|
||||
}
|
||||
|
||||
void InputDefault::set_gravity(const Vector3& p_gravity) {
|
||||
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
gravity=p_gravity;
|
||||
|
||||
}
|
||||
|
||||
void InputDefault::set_accelerometer(const Vector3& p_accel) {
|
||||
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
Reference in New Issue
Block a user