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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question XR Controller Not Tracking Device

Discussion in 'XR Interaction Toolkit and Input' started by BrianDuffyGames, Feb 22, 2021.

  1. BrianDuffyGames

    BrianDuffyGames

    Joined:
    Sep 16, 2018
    Posts:
    7
    I've been working on a VR project for a while and went through the process recently to upgrade to the action based input system without any issues. However yesterday I started a new project file in order to create a simplified example for someone else, following the same process to set up the XR rig with the action based controller manager to swap between ray and direct etc, but I found that while the camera was tracking my headset, the hands were not. I spent a little while trying to fix it before giving up.

    Today, I decided to start totally from scratch, I simply installed the Oculus XR plugin, XR plugin management and the new Interaction toolkit and sample input actions. I created a basic XR rig, made sure all the actions were assigned, and immediately the XR controllers failed to track my movement. I feel like I have checked everything that could be wrong in such a simple scene, and I have confirmed in the XR debugger that the device is being tracked as you can see in the lower left of the screenshot I've attached.

    Anyone got any ideas where I'm going wrong? The problem is immediate on new projects and no messages show in the console so I'm not sure what to even look for. This isn't my first time working in VR and strangely, my original project is still functioning perfectly. Also forgive the strange layout, I wanted to show everything relevant.

    vrbug.PNG
     
  2. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    I have the same problem. But with HTC Vive.

    Installed the package
    Set up the rig
    Set the actions
    klicked play

    The head works, in the debugger window i see the positions of the controllers changing and their actions recognized.
    But the Gameobjects of the controller stay on 0 0 0.
     
  3. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    RadaRadar likes this.
  4. ivanmuntahir25

    ivanmuntahir25

    Joined:
    Aug 9, 2021
    Posts:
    1
    duyuehui97 likes this.
  5. xOSSxKratos

    xOSSxKratos

    Joined:
    Apr 4, 2021
    Posts:
    11
    Everyone's problem is different. I have a solution that works for Oculus Quest users. Assuming you are trying to do the Tutorial VR Development. I was able to get the head to track but not the hands. This solution worked for me!
    The Solution:
    - In the Hierarchy select your XR Rig/Camera Offset/LeftHand Controller
    - In its Inspector remove the XR Controller (Action-Based)
    - Add Component, XR Controller (Device-based)
    - On the XR Controller (Device-based) component/Input/Controller Node change it to left hand (no need to change it on right hand because it is the default)

    You should have working hands.
    This fix is for XR Plugin Management Version 4.2.1
    I can only confirm it works for my Oculus Quest 2

    XR Controller Issue Help.png
     
    YCpike likes this.
  6. JaminFrederick

    JaminFrederick

    Joined:
    Feb 14, 2018
    Posts:
    2
    Confirming this also worked for me (Quest 2) - my issue was that one hand was tracking but not the other. Even though I was successful before without this glitch.

    Simply removing Action-based XR Controller component and adding a new Device-based one and setting Controller Node to Left and Right as stated above, seemed to fix it. (Started with a blank 3D Core project and did all the usual XR Interaction Toolkit steps)

    XR Interaction Toolkit 2.2.0
    XR Plugin Management 4.2.1
     
  7. markasuter

    markasuter

    Joined:
    May 20, 2019
    Posts:
    22
    UPDATE: If the above doesn't solve the "not tracking" here's what I did to get it working in Feb 2023, Unity v2021.3.8f1 (not sure which step solved it). I am using a Quest 2. I have the Oculus PC app running prior to launching Unity.
    1. In Window > Package Manager, using XR Interaction Toolkit 2.2.0. If you're above or below this, I removed the package, then (because I didn't see it in the Unity Registry of packages...) click the "+" dropdown > "add package from git url" and use "com.unity.xr.interaction.toolkit"
    2. In Unity, I removed any "XR Rig" or "XR Origin" GameObjects. Then under GameObject > XR > "XR Origin (VR)" (which has Left and Right Hand Controllers, whereas GameObject > XR > "XR Origin" DOES NOT. I intentionally rename the new gameobject "XR Origin (VR)" to remind myself which one I used!
    3. In Edit > Project Settings > XR Plug-in Management, I UNchecked Oculus (even though I'm using Quest 2) in both the Windows tab and the Android tab, and CHECKED the OpenXR.
    4. Just below XR Plug-in Management, click OpenXR, and in "Interaction Profiles", click "+" > Oculus Touch Controller Profile for both the Windows tab and Android tab.
    This worked for me, hope this helps!
     
    CSLiamP likes this.
  8. Dannark

    Dannark

    Joined:
    Jul 24, 2016
    Posts:
    14
    It did work on my pico 4 But if I do this, it breaks all my controllers action based, moviment everything that was related to the prefab "Complete XR Origin Set Up"... the weird part is that It was working fine few days ago.

    Also, I dont get this error when running on the PC version, only on the android build