05-24-2022 01:15 AM
Make a Unity 2020+ project.
Add OpenXR Oculus provider.
Add Oculus Integration (at the time of this writing v39, but doesn't really matter. Tried it with v37 also)
Load/make a scene with a controller prefab (could be OVRControllerPrefab or CustomHand).
OVRInput.Get(OVRInput.NearTouch.Any)) will always return false.
Change to Legacy OVRPlugin and it will return true when touching with thumb or index finger.
Anybody know why?
It seems to me a bit sloppy to make a plugin that is needed for the platform specific things (passthrough, hands, etc) while advocating for the OpenXR backend but then have this feature broken.
In many VR examples you often see a thumbs up gesture being made. That is pretty much impossible with OVRPlugin using OpenXR.
06-02-2022 11:43 PM - edited 06-03-2022 12:00 AM
Having same issue, still present using Oculus Integration v40 (released 2022-06-01). It is immersion breaking whilst using controllers with passthrough when your index fingers and thumbs don't move.
More digging shows that controllerState.NearTouches is always 0 at OVRPlugin.cs:2874
OVRP_1_16_0.ovrp_GetControllerState4(controllerMask, ref controllerState);
06-06-2022 07:45 PM
Have found a temporary work around. In Oculus\SampleFramework\Core\CustomHands\Scripts\Hand.cs:115 change UpdateCapTouchStates to:
private void UpdateCapTouchStates()
{
/*
m_isPointing = !OVRInput.Get(OVRInput.NearTouch.PrimaryIndexTrigger, m_controller);
m_isGivingThumbsUp = !OVRInput.Get(OVRInput.NearTouch.PrimaryThumbButtons, m_controller);
*/
m_isPointing = !OVRInput.Get(OVRInput.Touch.PrimaryIndexTrigger, m_controller);
m_isGivingThumbsUp =
!OVRInput.Get(OVRInput.Touch.PrimaryThumbRest, m_controller) &&
!OVRInput.Get(OVRInput.Touch.One, m_controller) &&
!OVRInput.Get(OVRInput.Touch.Two, m_controller) &&
!OVRInput.Get(OVRInput.Touch.PrimaryThumbstick, m_controller);
}
The caveat being this detects when the index fingers and thumbs are touching (but not pressing) the capacitive sensitive parts of the controller, but not when they are nearly touching them. For my use this was good enough.
06-29-2022 08:34 AM
I got around this by using the Legacy OVRPlugin. You can activate it in Oculus -> Tools -> OpenXR.