Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Swapping between Hands and Controllers only sometimes works

Discussion in 'XR Interaction Toolkit and Input' started by OverVenture, Aug 23, 2023.

  1. OverVenture

    OverVenture

    Joined:
    May 4, 2015
    Posts:
    3
    I'm fairly new to working with XR and OpenXR so the following is probably something I failed to setup correctly. Let me know where I went wrong if you can.

    When attempting to toggle between the Oculus/Meta Quest 2 registering that I'm using my hands vs using the Controllers will sometimes fail to register. For instance, I'll set the controllers down, my hands will appear, but when I pick the controllers back up the hand models will go away (Quest 2 registering that I'm no longer using my hands) the controller models don't properly load in. Sometimes setting the controller back down will allow me to use my hands again, but the controllers will never work again during that session. Sometimes the hands won't load back either and then I can't do anything at all.

    Specs and packages:
    -Unity 2022.3.7f1 LTS
    -Using URP
    -Input System 1.6.3
    -Oculus XR Plugin 4.0.0
    -OpenXR Plugin 1.8.2
    -XR Core Utilities 2.2.2
    -XR Hands 1.2.1
    -XR Interaction Toolkit 2.4.3
    -XR Legacy Input Helpers 2.1.10
    -XR Plugin Management 4.4.0

    -Using the XR Interaction Toolkit Sample Scene as a base and the defaults provided. Started with the XR Interaction Setup Prefab and added the Hands from the HandVisualizer scene.
     
  2. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    254
    Hi @OverVenture,
    Upon reviewing your post, I was able to reproduce what you are seeing as well, however, upon pressing a button on the controller, the controller models will reappear. Is this what you experience as well? Or are you seeing an issue where things go away forever?
    Also, when the controllers don't come back, do you feel a vibration in the controllers, letting you know the Oculus runtime picked them back up? If so, are you seeing any other signs of tracking, such as interaction rays and whatnot?
     
  3. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    220
    Thank you for specifying the versions of all the packages, it's a big help.

    Like Dave, I'm able to swap between hands and controllers just fine as long as I push a button on the controllers after I pick them up, which matches the behavior of the Oculus shell. Are you seeing this problem with swapping in the Unity Editor, PC standalone via Quest Link, or Android standalone? I tried all three and couldn't reproduce.

    I also verified with Window > Analysis > Input Debugger to check that OculusTouchControllerOpenXR (LeftHand) and OculusTouchControllerOpenXR1 (RightHand) reappeared under the Devices foldout when picking up the controllers and pressing a button.

    To help us narrow down the problem you are experiencing, do you also have the Oculus Integration asset installed in your project? If so, what version and which subfolders did you import? (EDIT: To be clear, that asset is optional and does not need to be installed for correct controller/hand tracking, but there's potential for conflicting configuration when both are installed which is why I asked if it was installed.)

    Can you also post a screenshot of your OpenXR settings in Edit > Project Settings? I would expect you to at least have Oculus Touch Controller Profile added to Interaction Profiles, and Hand Tracking Subsystem, Meta Hand Tracking Aim, and Meta Quest Support (Android only) features enabled.
     
    Last edited: Aug 31, 2023
  4. OverVenture

    OverVenture

    Joined:
    May 4, 2015
    Posts:
    3
    Thank you for looking into it.

    -I am using the PC standalone via Quest Link.
    -Whether the controllers vibrate or not varies, and they will show up under the Input Debugger if they vibrate, but not on the screen. Even if I press buttons. I changed the batteries just in case.
    -I do not get any rays or any other signs of tracking. I tried swapping the prefab models just in case.
    -I did not have the Oculus Integration asset installed, so I installed v56.0 and let it make its changes.

    The behavior changed slightly to now have an error instead of just not appearing. In other words, possibly the original issue was solved by the updates made.

    -The issue changed slightly with Oculus Integration installed, and can be accompanied by the following bug or just crashing occasionally: "Could not find active control after binding resolution".

    It's possibly related to this issue: https://forum.unity.com/threads/ope...ive-control-after-binding-resolution.1465583/

    -Below are screenshots from Project Settings:
    upload_2023-8-30_18-35-41.png
    upload_2023-8-30_18-36-2.png

    From a blank project I did the basics following this tutorial and ran into the same issue:
     
  5. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    220
    I edited my post, repeated here: To be clear, that Oculus Integration asset is optional and does not need to be installed for correct controller/hand tracking, but there's potential for conflicting configuration when both are installed which is why I asked if it was installed.

    There is currently an open active bug XRHB-35 where controller tracking may not work when the Meta XR Feature is enabled (which is a feature added when Meta's Oculus Integration asset is installed). Until that is fixed while that asset is installed, you will need to disable Meta XR under OpenXR Feature Groups to disable Meta XR Features so controllers will be correctly tracked.

    I see in your screenshot that there is a warning icon at least for Android build target. Can you click it or navigate to Edit > Project Settings > XR Plug-in Management > Project Validation and click to fix all issues to see if it resolves your issue? There may be others in the different tabs in that window.
     
  6. Shogos

    Shogos

    Joined:
    Sep 18, 2020
    Posts:
    1
    Thank you all.
    I had the same issue at stand alone Quest pro devices.
    And the issue is resolved after setting Meta XR off.
    upload_2023-9-1_13-40-27.png