WVR_EXPORT void WVR_TriggerVibration(WVR_DeviceType type, WVR_InputId id = WVR_InputId_Max, uint32_t durationMicroSec = 65535, uint32_t frequency = 1, WVR_Intensity intensity = WVR_Intensity_Normal)
Function to trigger vibration.
- API Level 4
- Effective with Runtime version 4 or higher
How to use¶
Here is an example for the function:
#include <wvr/wvr_device.h> // Trigger vibration 2 times per second. Keep the duration for each vibration at 0.5 sec. WVR_TriggerVibration(WVR_DeviceType_Controller_Left, WVR_InputId_Alias1_Trigger, 1000000, 2, WVR_Intensity_Normal);
Vibrator Intensity includes the following below:
Intensity of the vibration.
Vibration intensity is very weak.
Vibration intensity is weak.
Vibration intensity is normal.
Vibration intensity is strong.
Vibration intensity is very strong.
- If you would like to use vibrator ability befoer sdk version 3.1.0, using WVR_TriggerVibrator and this is a blocking API. If your sdk version is larger than 3.1.0, use WVR_TriggerVibration instead of original API, this new API is a non-blocking API.