Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Vandalaz's avatar
Vandalaz
Honored Guest
6 years ago
Solved

Affect vibration duration with OVRInput.SetControllerVibration

Hi,

I'm trying to create a short intense vibration of the Touch Controller when the player's hands collide with a game object. I'm using this code but changing the freqency value doesn't seem to affect the duration. Anyone have any ideas?

OVRInput.SetControllerVibration(1f, 1f, OVRInput.Controller.RTouch);

  • The documentation says that you should call this method periodically, and that the vibration lasts for a maximum of 2.5 seconds. So I think it's up to you manage the duration, calling this method when the vibration have to start and also when the vibration have to stop (frequency = 0 will disable the vibration). And if you want a longer duration than 2.5 seconds, you have to call the method periodically to maintain the vibration active.

1 Reply

Replies have been turned off for this discussion
  • The documentation says that you should call this method periodically, and that the vibration lasts for a maximum of 2.5 seconds. So I think it's up to you manage the duration, calling this method when the vibration have to start and also when the vibration have to stop (frequency = 0 will disable the vibration). And if you want a longer duration than 2.5 seconds, you have to call the method periodically to maintain the vibration active.