Fix Vive controller bindings on OpenXR - #2376
Conversation
|
works for me |
|
|
||
| // TODO: Customisable click threshold? | ||
| if (left_trigger.isActive && left_trigger.currentState >= 0.95f) { | ||
| if (left_trigger.isActive && left_trigger.currentState >= 0.8f) { |
There was a problem hiding this comment.
Are the triggers on the Vive Wands triggered too easily? Or is this unrelated?
At least on my Oculus Quest 1, the change isn't noticeable. I would be more worried about the Vale Index controllers anyway though.
There was a problem hiding this comment.
This change is so the virtual "click" action is triggered a little before the trigger bottoms out against the physical click button on the Vive controllers. Index controllers hit 1.0 a bit before bottoming out, but Vive controllers bottom out around 0.7-0.8.
There was a problem hiding this comment.
I guess at some point we would want to be able to set different mappings for different controllers.
Though I already see how vaguely the controllers are identified by some runtimes:
LOG in xrGetSystem: Selected devices
Head: 'WiVRn HMD'
Eyes: '<none>'
Left: 'WiVRn left controller'
Right: 'WiVRn right controller'
Gamepad: '<none>'
Hand-Tracking Left (unobstructed): 'WiVRn left controller'
Hand-Tracking Right (unobstructed): 'WiVRn right controller'
Hand-Tracking Left (conforming): '<none>'
Hand-Tracking Right (conforming): '<none>'
[08/10 17:30:04] [INFO] [openxr.context] System name : Oculus Quest on WiVRn
[08/10 17:30:04] [INFO] [openxr.context] Max layers : 128
[08/10 17:30:04] [INFO] [openxr.context] Max swapchain size : 16384x16384
[08/10 17:30:04] [INFO] [openxr.context] Orientation Tracking: 1
[08/10 17:30:04] [INFO] [openxr.context] Position Tracking : 1
I haven't tested this on the Valve Index's controllers, but it should be good enough, I guess.
The thumbstick emulation thing I added in #1948 was apparently broken. This gets Vive controllers working again and gives them access to the primary button by clicking the center of the trackpad.