Shin-NiL / Godot-Mobile-Vibration

Mobile vibration module for Godot Game Engine
18 stars 8 forks source link
godot mobile module vibrate

Donate

Godot Mobile Vibration

This is a vibration module for Godot Game Engine 3 for Android & iOS (need testing).

How to use

Android

To use this module you'll need a custom template for Android. You can build it by yourself or download a precompiled one.

Compiling the template (First Option)

This is harder, but you'll have more control over the building process. You can, for example, include any other module you want. For that, do the following steps:

Using precompiled templates (Second Option)

If you don't want or can't build the template by yourself, you can find a precompiled template with this module here. Go to the release tab and download the zip file.

Project configuration

[android]
modules="org/godotengine/godot/Vibration"

If you have more than one module separate them by comma.

iOS

API Reference (Android & iOS)

The following methods are available:

# Make the device vibrates
# @param int duration the vibration duration in milliseconds (this parameter is ignored on iOS)
vibrate(duration)

Demo

In the demo directory you'll find a working sample project for Godot 3.