Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

oculus vr haptic feedback

Discussion in 'VR' started by unity_iN7PWONs9N7Nwg, Jul 16, 2019.

  1. unity_iN7PWONs9N7Nwg

    unity_iN7PWONs9N7Nwg

    Joined:
    Feb 10, 2019
    Posts:
    1
    Hello.

    i am making a drumming game for oculus vr. When i make code for haptic feedback, i cant find any way to change the lenght(amount of seconds) of the vibration. is there anyway to change it?


    here is the code
    Code (CSharp):
    1.  
    2. private void OnTriggerEnter(Collider other)
    3.     {
    4.  
    5.         if(other.tag == "DrumStickHead")
    6.         {
    7.             OVRInput.SetControllerVibration(1, 1, OVRInput.Controller.RTouch);      
    8.         }
    9.  
    10.         if (other.tag == "DrumStickHead2")
    11.         {
    12.             OVRInput.SetControllerVibration(1, 1, OVRInput.Controller.LTouch);
    13.         }
    14.     }      
     
unityunity