Native Vibration plugin for Unity Android - Add cool force feedback now!

Native vibrator plugin for Unity Android.

Available now on the Asset Store:
Asset Store entry

Works with both Basic and Pro.

iPhoneUtils.Vibrate() does vibrate for a long time on iOS and Android too.

Where iOS doesn’t expose a method to do smaller (shorter) vibrations, Android has the ability of vibrate() for a given number of milliseconds and also, play “patterns” of vibrations like morse code, or other combination in patterns with PlayPattern().

Add cool force feedback through the device vibrator in your game or app now !
Tired of having just a half a second vibration ?
Try this and make morse code / rythms / light or heavy rumbles / any kind of vibration you may imagine with VibratePattern () !

Docs:

For initialization:

Vibrator vibration;

void Start()
{
		// Startup vibration Java object
		vibration = new Vibrator();
		vibration.Init();
}

To invoke it:
from anywhere:

vibration.Vibrate ( (long) duration ); // make it vibrate for duration milliseconds
vibration.VibratePattern ( (long) pattern[], (int)repeat_index); // play a pattern defined in the pattern[] array with ability of looping it at a given index)
vibration.Cancel(); // stop the current vibration or vibration pattern loop (it stops also an eventual iPhoneUtils.Vibrate() call)
vibration.Dispose(); // Used in OnApplicationQuit stops the vibration and destroy the library class.

Enjoy !

Is it possible to do similar functionality on iOS?

You can ask Apple.
iOS SDK doesn’t expose similar methods AFAIK.

Our company has a method for controlling vibration intensity for Android apps. Checkout this thread about our Immersion Haptic Vibration Plugin for Unity. The pre-made effect libraries from Immersion are already being used by Sega, Rockstar Games and Handy Games, just to mention a few. :sunglasses:

Not so nice to come on another same-feature plug-in thread to advert for this plug-in. Don’t you think ?

Anyway, I think that:

A) Doesn’t look simple.
B) 120 premade what ? Arrays of numbers users could do easily by testing some combinations ?
C) I can’t see the benefit to use such a complicate system, to access native Android SDK Vibration, unless you are telling me that this system, is controlling exactly how the vibration rumble engine moves, and I don’t think you can do this on the hardware bypassing Android SDK, but I could be wrong.

No, mine is not used by Sega and Rockstar games, infact cost 10$ but it’s super easy to implement and just works :stuck_out_tongue: