Vibration Module

Coda Vibration Module provides simple vibration solutions for both android and ios.


duration : long, milliseconds (1000ms = 1 seconds)
intensity : float(0f-1f), intensity means the strength of the haptic.
sharpness : float(0f-1f) You can think of sharpness as a way to abstract a haptic experience into the waveform that produces the corresponding physical sensations. Specifying sharpness lets you relay to the system your intent for the experience. For example, you might use sharpness values to convey an experience that’s soft, rounded, or organic, or one that’s crisp, precise, or mechanical.


Predefined vibrations below:

CodaVibration.VibrateSoft();//duration:100ms, intensity:0.25f, sharpness:0.25f
CodaVibration.VibrateMedium();//duration:250ms, intensity:0.5f, sharpness:0.5f
CodaVibration.VibrateHard();//duration:500ms, intensity:1f, sharpness:1f

Custom vibration can also be created with desired parameters:

CodaVibration.Vibrate(duration, intensity, sharpness);


intensity and sharpness parameters only apply to ios.

Did this page help you?