ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
352 stars 82 forks source link

Trouble with Vive 2.0 Haptic #99

Open SujAtGithubBuzz opened 5 years ago

SujAtGithubBuzz commented 5 years ago

In the new Input system of vive 2.0 , i couldnt get the haptic working. I have used the hapticAction.Execute() to trigger haptic but no help. Any reference or suggestions regarding this will be very helpfull. Please note i want the haptic to happen on certain condition, not on trigger press.

chengnay commented 5 years ago

@SujAtGithubBuzz You can try using the following code to fulfill your haptic action. Before using below haptic action, you will need to install VIU and SteamVR 2.0 plugin.

ushort hapticValue = 500; ViveInput.TriggerHapticPulse(HandRole, hapticValue);

Let me know if you have more questions, thanks!