summaryrefslogtreecommitdiffstats
path: root/core/os/input.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-08-21 21:10:22 +0200
committerGitHub <noreply@github.com>2019-08-21 21:10:22 +0200
commit1a4dbd9ee2fd471108dc4d217aacab74cf412925 (patch)
tree2563d9aa95cd5b9d5a1a15c76664df2e5d333be5 /core/os/input.cpp
parente132c36261e832b7b461d97909bf15786acc85ba (diff)
parent4061e5bb75cf4ad338cd077713946711cd7c70ea (diff)
downloadredot-engine-1a4dbd9ee2fd471108dc4d217aacab74cf412925.tar.gz
Merge pull request #31437 from volzhs/vibrate-mobile
Support vibration for Android and iOS
Diffstat (limited to 'core/os/input.cpp')
-rw-r--r--core/os/input.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp
index f04d4a1b3e..51cb41b184 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -80,6 +80,7 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string);
ClassDB::bind_method(D_METHOD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0));
ClassDB::bind_method(D_METHOD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);
+ ClassDB::bind_method(D_METHOD("vibrate_handheld", "duration_ms"), &Input::vibrate_handheld, DEFVAL(500));
ClassDB::bind_method(D_METHOD("get_gravity"), &Input::get_gravity);
ClassDB::bind_method(D_METHOD("get_accelerometer"), &Input::get_accelerometer);
ClassDB::bind_method(D_METHOD("get_magnetometer"), &Input::get_magnetometer);