Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Primary button on quest 2 controllers never returns true when pressed

Discussion in 'XR Interaction Toolkit and Input' started by MyrddinVH, Jun 13, 2022.

  1. MyrddinVH

    MyrddinVH

    Joined:
    Dec 7, 2020
    Posts:
    1
    I am trying to use input from the primary and secondary buttons on oculus quest 2 controllers. However they never return a true value when pressed (looking at the XR Interaction Debugger). The touch of the buttons does return true when you touch the buttons. The oculus touch controller profile is added as well.
    every other input works fine. Its just the primary and secondary button pressed on both controllers that never return true.

    Im running the latest version of unity and the XR plugins.
    Ive tried it on several quest 2 headsets so its not my controllers being broken either.
    Ive also tried creating a new project as well and same result.


    Update: it appears that when im using steamVR it doesnt register the button presses. but when steamVR isnt running it does. Still dont understand how or why yet tho
     
    Last edited: Jun 13, 2022
    xinuxano likes this.
  2. Freakish

    Freakish

    Joined:
    Jun 3, 2015
    Posts:
    81
    I can confirm this is an issue.

    Although I just tested A16 & SteamVR beta 1.23.1 and the secondary button works, but primary button doesn't. Both primary and secondary touch is detected however.

    It happened a few weeks back, and I believe it's a SteamVR issue, although surprised it hasn't been resolved.

    Similar issue happened about 2 weeks before that, and Steam updated and fixed the issue on the same day, but this time it has been several weeks without a fix.

    I was mid project, when a SteamVR beta update updated, and suddenly the button stopped working, I had to change my project to use a different button as a workaround.

    Are you running Steam VR Beta?

    I just looked and cannot see anyone on the SteamVR developer forum who has reported it, but it's highly annoying.
     
    xinuxano likes this.
  3. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    One of my users has the same problem. This is a build .exe for PC VR running on Oculus Quest2 using Virtual Desktop.

    Everything was working perfectly until a few weeks ago. Has stopped responding buttons A, B, X, Y... the rest (trigger, tracking, joysticks) works fine.

    It's happening on two different PCs with two different Oculus Quest 2, so it's not a hardware issue.

    I'm still investigating this case, but I also suspect it has to do with some update to SteamVR and/or the OpenXR runtime (Oculus runtime or SteamVR runtime).

    The current SteamVR version is: 1.22.13. I will try to update using the latest available SteamVR beta.

    Seems related with: https://forum.unity.com/threads/ocu...ndary-button-presses-not-registering.1282511/
     
    Freakish likes this.
  4. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    We have updated to SteamVR v. 1.23.2 (beta 06/15/2022), with SteamVR as OpenXR runtime and the problem persists. The software doesn't get the buttons input (X, Y, A, B) from the Oculus Quest 2. The rest works fine: tracking controls, triggers and joysticks.
     
  5. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    Hi - Can you check in the old binding UI if on the machines it's not working that the current active binding for your app/game is the default OpenXR one, and not a custom personal binding?

    Can you provide a screenshot of how the mapping looks like on your end in these machines?

    upload_2022-6-17_7-34-38.png
     
  6. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    These are the captures that my user sends me. It seems that there are no modifications, nor custom bindings.
    Any additional suggestions or checks?
    Thanks for your help

    binding_1.png

    binding_2.png

    binding_3.png

    binding_4.png

    binding_5.png
     
  7. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    thanks! it looks like there are two unbound actions for the "oculustouchcontroller" actionset. If you click the "+" for either Button X or Button Y, can you see if the click actions are actually bound? If you hover over "oculustouchcontroller", you should see the unbound actions.

    my best guess is something isn't quite right in the action bindings within Unity. perhaps some *.inputActions files or meta files are missing/corrupt? make sure there're bindings mapped to the primary button, e.g.:

    upload_2022-6-17_10-17-23.png

    might be worth trying to create a new test project using the Unity controller sample from Package Manager and see if it's really machine specific and not a project specific issue.
     
  8. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    .. .and make sure the ActionMap is all hooked up properly:

    upload_2022-6-17_10-33-16.png
     
  9. Freakish

    Freakish

    Joined:
    Jun 3, 2015
    Posts:
    81
    My UI bindings show Oculus Touch Legacy for SteamVR, but on my own project it shows the same "Bindings from OpenXR."

    I tried editing OpenXR bindings to change Button Click to various other options, Button touch always registers, but primary and secondary button press, is never registered.

    The buttons are detected correctly in the Steam UI 'Test Controller' function, but in Unity the Input Debugger never registers. This was working correctly until a few weeks ago.

    I was using the button mid project, after a small SteamVR update, it simply stopped working, I loaded several older projects and they had all stopped working after the update.

    Similar issue happened with PrimaryAxis2D at the end of March, but the issue was fixed same day.
    https://forum.unity.com/threads/steamvr-beta-1-22-1-issues.1259786/#post-8002964
     
    xinuxano likes this.
  10. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    Hi - can you check the response above and see if it applies to you?
     
  11. Freakish

    Freakish

    Joined:
    Jun 3, 2015
    Posts:
    81
    Yep, thanks for checking into it runeberg. I will check thoroughly my actionmaps and also try other suggestions like new projects, and report back.

    I have a laptop running SteamVR (non beta) which I will also check to see if I can dig further.
     
  12. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    Also, which version of Unity and the OpenXR Plugin are you using?
     
  13. Freakish

    Freakish

    Joined:
    Jun 3, 2015
    Posts:
    81
    I've tried multiple versions... I have older projects that always worked, running for example various incarnations of Unity 2021.2, 2022.1.3f1, and also on 2022.2 Alpha13/Alpha 16.

    Older projects I just tested were running, OpenXR Plugin v1.3, same issues running the latest 1.42 from Package Manager on newer projects.
     
  14. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    I have checked the Unity's project. See screenshots for mapped actions.

    I can also confirm the following:
    - Despite I'm using an old version of the XR interaction toolkit (1.0.0 pre3) and Unity 2020.3.8f1, everything was working fine until a few weeks ago (maybe when update to SteamVR v. 1.22 ~ 24 MAY).
    - HTC and Valve Index works fine
    - Oculus Quest 2, trigger, joysticks, grip, tracking controllers works fine
    - It's happening on two different PCs with two different Oculus Quest 2, so it's not a hardware issue.
    - As Freakish say, the buttons are detected correctly in the Steam UI 'Test Controller' function, but no into the Unity's build.
    - It doesn't seem to have any corrupted files (.inputActions or meta files), the build hasn't been changed in several months.
    - I have updated to SteamVR v. 1.23.2 (beta 06 JUN), with SteamVR as OpenXR runtime and the problem persists.

    Again, thanks a lot for your help, suggestions... Let's see if other developers can also contribute something more.

    openxr_1.png

    openxr_2.png

    openxr_3.png
     
    Freakish likes this.
  15. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34

    Hi, can you confirm please the Unity OpenXR plugin version you're using?
     
  16. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    Found the issue - will have a fix in the next beta next week. In the meantime, you can add the Microsoft Motion Controller Profile in your OpenXR bindings and the primary and secondary click bindings should then work:

    upload_2022-6-18_17-9-18.png

    In-depth technical reason for the issue:
    If we don't receive a binding for a controller (e.g. WMR), but a touch controller binding was sent. We attempt to remap the touch inputs to all controllers we support.

    For WMR specifically, it doesn't have abxy buttons, so instead, we auto-generate dpad bindings for the trackpad so it'll act as a proxy for abxy buttons (upper and lower half regions of the trackpad).

    There was a fault in the way we're tagging actions as dpads and inadvertently affected the original touch bindings.
     
  17. Freakish

    Freakish

    Joined:
    Jun 3, 2015
    Posts:
    81
    Thankyou Runeberg. Much appreciated, adding the Microsoft Motion Controller, instantly returned the buttons presses to being registered as normal.

    Much appreciate you working through the issues with us, and I'm glad you've found the fix...

    Cheers!
     
  18. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    Runeberg, I am very very grateful to you. Thank you for your valuable time and help. Thanks to Freakish too.
    I will try the next beta update, and I will confirm the results.

    Regards!
     
  19. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    I can confirm that the new version SteamVR 1.23.4 beta fixes the issue (with no build changes) on both PCs and Oculus Quest 2.
    Thank you very much for your valuable help.
     
  20. nicholasmillersus

    nicholasmillersus

    Joined:
    Jun 23, 2022
    Posts:
    2
    @runeberg-valve I am seeing the same behavior with the Vive Focus 3, even after trying to add the Windows Motion Controller profile and updating to SteamVR 1.23.4. Is there anything that can be done do to restore the primary button function?

    Sorry, a bit of clarification: I am using the tethered option through SteamVR on a PC... The input debugger in Unity shows the buttons states changing when pressed, for the mappings that I have set in my interaction profile, but Unity does not fire the input events. Sometimes the secondary fires the event for the right hand only... perhaps its an issue with the mapping in Steam?
     
    Last edited: Jul 8, 2022
  21. AndyUr

    AndyUr

    Joined:
    Aug 17, 2015
    Posts:
    19
    In my team are also having issues with the primary and secondary buttons for oculus touch controllers. Touch actions showed in the XR Interaction Debugger, but presses didn't.
    I can confirm that that they correctly showed both as a user, when opting to the current SteamVR beta (1.23.6). And also from the dev side when adding the Microsoft Motion Controller Profile (so weird).

    Versions where the issue happens for us:
    - Unity 2021.3.6f1 and Unity 2020.3.23f1
    - OpenXR plugin 1.4.2
    - XR Interaction Toolkit 2.0.2
    - XR Plugin Management 4.2.1
     
  22. CBHM

    CBHM

    Joined:
    Feb 12, 2019
    Posts:
    32
    I was having the same issue,

    Unity 2020.3.35f1
    Plugin Provider - OpenXR

    Interaction Profiles
    • Oculus Touch Controller Profile
    • HTC Vive Controller Profile
    • Valve Index Controller Profile

    XR plugin Management v4.2.0
    XR Interaction ToolKit v2.0.2
    Input System v1.4.1

    Active Runtime - SteamVR
    Steam VR version 1.22.13

    Adding Microsoft Motion Controller Profile to the Interaction profile worked for me. Thanks @runeberg-valve