This is an Android vibration plugin for Godot Game Engine 3.2 or greater. For Godot < 3.2 or iOS support you can use the old module.
- Configure, install and enable the "Android Custom Template" for your project, just follow the official documentation;
- download or clone this repository;
- drop the
vibration-plugin
directory (from this repository) inside theres://android/
directory on your Godot project. - on the Project Settings -> Android -> Modules, add the string:
org/godotengine/godot/Vibration
* If you're using more than one module separate them by comma.
* This plugin needs the Vibrate
permission, which is automatically inserted.
The following methods are available:
# Make the device vibrates
# @param int duration the vibration duration in milliseconds
vibrate(duration)
In the demo directory you'll find a working sample project where you can see the plugin in action.