Forum Discussion
peterpop
3 years agoExplorer
OVRInput.NearTouch not working with OVRPlugin with OpenXR backend
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 cont...
edekker
3 years agoExplorer
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);
edekker
3 years agoExplorer
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.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 days ago
- 5 years ago