Forum Discussion
playsnakvr
7 years agoExplorer
Bug when both controllers are vibrating
If I trigger both controllers to vibrate for N seconds, instead I get an N second delay, followed by the requested vibration. This seems to happen quite consistently any time we have both controllers vibrating simultaneously.
I'm using Unity 2018.2.7f1 and Oculus Integration 1.27, and I'm triggering the vibration with:
Is this a known issue?
I'm using Unity 2018.2.7f1 and Oculus Integration 1.27, and I'm triggering the vibration with:
byte[] samples = new byte[90];
for (int Idx = 0; Idx < samples.Length; ++Idx)
{
samples[Idx] = 255;
}
OVRHapticsClip testClip = new OVRHapticsClip(samples, samples.Length);
OVRHaptics.LeftChannel.Mix(testClip);
OVRHaptics.RightChannel.Mix(testClip);
Is this a known issue?
3 Replies
Replies have been turned off for this discussion
- playsnakvrExplorer@imperativity Thanks for the suggestion. The SetControllerVibration fix worked fairly well, but still breaks sometimes when both hands are vibrating simultaneously - it seems to easily get "stuck on", and will vibrate for the next two seconds no matter how often I call SetControllerVibration(0,0). It seems to be a timing issue, I was able to reproduce it quite consistently (about once every three times I press the button) with the following code:public class VibrateTest : MonoBehaviour{private void Update(){if (OVRInput.GetDown(OVRInput.Button.Four)){StartCoroutine(Vibrate());}}IEnumerator Vibrate(){OVRInput.SetControllerVibration(1, 1, OVRInput.Controller.LTouch);OVRInput.SetControllerVibration(1, 1, OVRInput.Controller.RTouch);yield return null;yield return null;OVRInput.SetControllerVibration(0, 0, OVRInput.Controller.LTouch);OVRInput.SetControllerVibration(0, 0, OVRInput.Controller.RTouch);yield return null;yield return null;OVRInput.SetControllerVibration(1, 1, OVRInput.Controller.LTouch);OVRInput.SetControllerVibration(1, 1, OVRInput.Controller.RTouch);yield return null;yield return null;OVRInput.SetControllerVibration(0, 0, OVRInput.Controller.LTouch);OVRInput.SetControllerVibration(0, 0, OVRInput.Controller.RTouch);}}
- playsnakvrExplorer@imperativity Any chance one of these bugs in OVRHaptics or SetControllerVibration might be fixed soon? This is basically making it impossible to have both controllers vibrate at the same time (in our case, holding a two-handed machine gun).
- AnonymousI'm hitting the same issue.
Should we not be using OVRHaptics at all if we need to vibrate both controllers simultaneously?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device