How can I make the phone vibrate?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zylann
:warning: Old Version Published before Godot 3 was released.

I need an improved touch feedback in my game.
On the mobile version, how can I make the phone vibrate for very short periods of time?

I’m looking the same feature,and thought it was included, but no lucky.

alexzheng | 2017-09-27 03:34

This dates back to 2016… has it been resolved / the feature integrated in Godot 3.x ?
(or is there a time line for implementing it)

GameVisitor | 2019-03-29 21:07

Still waiting for someone to make a PR: Phone vibration support · Issue #4833 · godotengine/godot · GitHub

Zylann | 2019-03-29 21:08

Sorry if this sound basic knowledge, but who is allowed to do : Problem Report on github ? Can we accelerate the thing by making a feature request ?

:slight_smile:

GameVisitor | 2019-03-30 17:35

Anyone is allowed to report issues, but this one was reported already. Now the best way to accelerate things is to implement it and make a PR, as the core dev team is focusing on larger issues. If you can’t, upvote the issue :wink:

Zylann | 2019-03-30 17:36

:bust_in_silhouette: Reply From: jospic

For Android there is a custom module to integrate in Godot source before compiling:

I have not idea if is there a module for iOS.
.j

Argh, too bad, I thought there was built-in way of doing it… something that basic should be included in the engine.

Zylann | 2016-05-26 23:00

I’ve done a plugin for that here is the repo:
GitHub - DisDoh/GodotVibrate: Vibration on android with Godot

DisD | 2020-11-06 08:39

It seems there is a native function, now:

Input.vibrate_handheld(time)

Input — Godot Engine (4.x) documentazione in italiano

for android and iOS.
-j

jospic | 2020-11-06 09:28

I can set the amplitude of vibration in my plugin but didn’t knew that built in vibration.

DisD | 2020-11-06 09:55

:bust_in_silhouette: Reply From: DisD

I’ve done a plugin for that on android here is the repo: