I have a Unity build using VR integration with a Oculus Quest 2 headset and until recently the button input of the VR controllers worked fine. But a few days ago the A-, B-, X- and Y-buttons became unresponsive in the Unity editor and in both new and old builds of my application.
All of the following code samples always returns false:
OVRInput.GetDown(OVRInput.RawButton.B) OVRInput.Get(OVRInput.RawButton.B) OVRInput.GetDown(OVRInput.Button.Two, OVRInput.Controller.Touch) OVRInput.GetDown(OVRInput.Button.Two, OVRInput.Controller.Hands)
Even when I check for a response from any button then it still returns false when I push the A-, B-, X- or Y-button
OVRInput.GetDown(OVRInput.RawButton.Any)//still returns false on A, B, X, Y buttons, but true on any other button
Adding the OVRInput.Update() or OVRInput.FixedUpdate() does not help either.
I have tried my builds with two different headsets and connecting to two different PCs running the editor or build. I also tried to unpair the controllers and pair them to the headset again, but it did not fix the problem.
Unity version: 2020.3.22f1
Oculus Integration: 41.0
Oculus XR Plugin: 1.10.0
Oculus headset version: 18.104.22.168.259.370694197
Connects application and headset with Virtual Desktop - Version 1.20.38
PC: Windows 10
I later tested the controllers with the steam input debugger running in the background and steam does pick up the A, B, X, Y buttons correctly when pressed or let go off. So I'm guessing it has to be a Unity specific problem or a bug with the Virtual Desktop (both the Oculus Integration and Virtual Desktop has had updates since the original time of posting this with no effect on the problem, and the version numbers above has been updated).
I think I met a similar problem.
I use OVRInput.GetUp(OVRInput.RawButton.B) to detect whether B is released. A few weeks ago it worked fine. Suddenly it fails.
I use Debug.Log() to check the values and get a surprising conclusion:
OVRInput.Get() works fine but OVRInput.GetUp() and OVRInput.GetDown() always returns false.
And accidentally I found that if I deleted OVRInput.Update() from the beginning of Update(), this bug is fixed. I don't know why. The official document says OVRInput.Update() should be at the beginning of Update() but it causes the bug.
Thanks for your replay, and I'm glad to see that you found a solution that works for you.
Unfortunately, your fix does not work for me. I get the same result using the OVRInput.Update() as without it, and I still get false on both GetDown(), Get() and GetUp() when listening on the B button (or the other letter buttons).
I have now also tested the controllers with the steam input debugger running in the background and steam does pick up the A, B, X, Y buttons correctly when pressed or let go off. So I'm guessing it has to be a Unity specific problem or a bug with the Virtual Desktop Streamer.