summaryrefslogtreecommitdiffstats
path: root/core/os/input.cpp
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2019-08-18 00:27:29 +0900
committervolzhs <volzhs@gmail.com>2019-08-21 23:38:53 +0900
commit4061e5bb75cf4ad338cd077713946711cd7c70ea (patch)
treec5785dda4fffaf01ed6d751b9638dea62421d257 /core/os/input.cpp
parent86371b7298e32356c8ce892f768c56bec7088292 (diff)
downloadredot-engine-4061e5bb75cf4ad338cd077713946711cd7c70ea.tar.gz
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);