ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
352 stars 82 forks source link

Oculus Rift with OpenVR driver has delay on GetPressUp #199

Open wirelessdreamer opened 3 years ago

wirelessdreamer commented 3 years ago

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 commented 3 years ago

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; }

chengnay commented 3 years ago

@wirelessdreamer Are you using Unity XR or Unity Native?

wirelessdreamer commented 3 years ago

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

wirelessdreamer commented 3 years ago

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.

chengnay commented 3 years ago

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

chengnay commented 3 years ago

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?