This question was
closed May 18, 2016 at 11:10 PM by
boxmyth for the following reason:
The question is answered, right answer was accepted
Question by
boxmyth · May 17, 2016 at 05:12 PM ·
scripting problemhaptic
Haptic duration scripting
Sorta scripting-noob question (C#): I’m using the below scripts (just the relevant parts) to get haptic feedback, but the best I can do is 3999 microseconds each time, which isn’t very impressive. What do I have to add to allow it to give, say, up to 1 entire second of haptic feedback? (preferably adjustable durations)
public class NVRHand : MonoBehaviour
public void TriggerHapticPulse(ushort durationMicroSec = 500, EVRButtonId buttonId = EVRButtonId.k_EButton_SteamVR_Touchpad)
{
if (Controller != null)
{
Controller.TriggerHapticPulse(durationMicroSec, buttonId);
}
}
public class NVRInteractableItem : NVRInteractable
public NVRHand IsInteracting = null;
if (IsAttached == true)
{
AttachedHand.TriggerHapticPulse (3000);
}
Full disclosure: This is from the NewtonVR control system for the Vive: NewtonVR
Thanks all!
Comment
Follow this Question
Related Questions
Raycast not taking full length 0 Answers
Showing a high score in the menu 1 Answer
how to manage different objects with the same script. 0 Answers
Destroyed instance of Prefab, can't spawn it back. 1 Answer
Сonstructor return null 0 Answers