How to send vibration to devices

114 Views Asked by At

At some moments I need to send vibration to the devices because the players need to make selections through the device. How do I do this? If there is a way to send vibration to all devices can anyone tell me how? I tried this but it didn't work on some devices

1

There are 1 best solutions below

0
Marc Schärer On

The airconsole-api that you use in your controllers javascript offers an airconsole.vibrate() function. Using a message from your screen you can trigger it.

You would want to use airconsole.vibrate to avoid the browser specific navigator.vibrate resolution in the Pong Example. I will take note to update this and integrate it in the Unity example too.