ViveInputUtility-Unity icon indicating copy to clipboard operation
ViveInputUtility-Unity copied to clipboard

Oculus Rift with OpenVR driver has delay on GetPressUp

Open wirelessdreamer opened this issue 4 years ago • 6 comments

When using the Oculus driver this works as expected if(ViveInput.GetPressDown(viveRole, shootButton)) { Debug.Log("Bang"); } else if(ViveInput.GetPressUp(viveRole, shootButton)) { Debug.Log("UP"); }

but when using the openvr driver, there is about a half second delay on the up event, this makes pressing the trigger rapidly in succession, not register.

wirelessdreamer avatar Oct 07 '20 16:10 wirelessdreamer

the same issue exists with get axis, and only happens with the oculus controller, when using OpenVR if(!triggerDown && ViveInput.GetAxis(viveRole, ControllerAxis.Trigger) > 0.7) { Debug.Log("Bang"); triggerDown = true; } else if(triggerDown && ViveInput.GetAxis(viveRole, ControllerAxis.Trigger) < 0.68) { Debug.Log("UP");
triggerDown = false; }

wirelessdreamer avatar Oct 07 '20 17:10 wirelessdreamer

@wirelessdreamer Are you using Unity XR or Unity Native?

chengnay avatar Oct 12 '20 11:10 chengnay

Legacy, I haven't moved to Unity XR since there is no production ready support for OpenVR in it.

wirelessdreamer avatar Oct 12 '20 13:10 wirelessdreamer

To help clarify, this behavior only happens when The SteamVR plugin isn't installed. When building for Oculus the SteamVR plugin has to be deleted from unity projects, or it won't pass Oculus VRC checks for the store.

wirelessdreamer avatar Oct 12 '20 15:10 wirelessdreamer

@wirelessdreamer Will it be better to use ViveInput.GetPress instead of ViveInput.GetPressDown or ViveInput.GetPressUp?

chengnay avatar Oct 13 '20 10:10 chengnay

When building for Oculus the SteamVR plugin has to be deleted from unity projects, or it won't pass Oculus VRC checks for the store.

Do you know how Oculus VRC checks? Is this only happens for PC application? What if you are building for Android and you have SteamVR Plugin in the project, will Oculus VRC still fail?

chengnay avatar Oct 14 '20 03:10 chengnay