Search Unity

Resolved Controllers not Tracking

Discussion in 'XR Interaction Toolkit and Input' started by Quidam2k, Nov 16, 2020.

  1. Quidam2k

    Quidam2k

    Joined:
    Apr 6, 2015
    Posts:
    6
    I'm making the move from VRTK to the new XR architecture in Unity, and have checked out several getting started tutorial videos. I can get my scene to show up in my headset when I hit Play, but my controllers won't track. I've got the XR Interaction Toolkit package installed, 0.10.0-preview.7. I feel like I must be missing something obvious, but nothing I'm seeing in my research indicates I need to be doing anything differently- or so it would seem. Thanks in advance for any light you might be able to shed.
     
  2. Bkaya44

    Bkaya44

    Joined:
    Nov 17, 2020
    Posts:
    2
    I'm also having the same problem, I hope someone knows a way to fix this.
     
  3. Quidam2k

    Quidam2k

    Joined:
    Apr 6, 2015
    Posts:
    6
    Turns out I do! It seems I picked the worst possible day to get back into it- the day they changed the preview Interaction Toolkit and before anyone had posted about how it broke stuff. I've applied these changes to my empty scene and can confirm it worked for me.

     
  4. Bkaya44

    Bkaya44

    Joined:
    Nov 17, 2020
    Posts:
    2
    Thank you! The video helped me fix the issue I was having.
     
  5. simon_winter

    simon_winter

    Joined:
    Oct 8, 2018
    Posts:
    14
    so stupidly hidden, thanks for this video!
    tl;dw:
    the actiosn in the controlers which are not set by default have to be set. you can download presets in the package manager and use those instead.
     
    greyfoxlinux likes this.
  6. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    Great Info! Many thanks.
     
  7. SharonJK

    SharonJK

    Joined:
    Jul 7, 2020
    Posts:
    1
    You have no idea how helpful this was. Thanks for posting!
     
    MrDavidBlaine likes this.
  8. krishnapriyachoudoor

    krishnapriyachoudoor

    Joined:
    Jun 2, 2021
    Posts:
    8
    Thank you for posting this ! Really helpful !!
     
  9. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    just had same issue,
    problem was that i didn't have any interaction profiles added in:
    Project Settings/XR plugin management/OpenXR/Interaction profiles - list.

    found this from
    Window / XR / OpenXR / Input validation
     
  10. markasuter

    markasuter

    Joined:
    May 20, 2019
    Posts:
    24
    Long story short: as of September 2022 with XR Interaction Toolkit 2.1.1, you need to
    1. click "XR Origin"
    2. Add the component "Input Action Manager"
    3. Set Action Assets to 1
    4. Use the target (circle button) to select XRI Default Input Actions".
    5. Controllers are tracking again!
     
    RogueStargun and duyuehui97 like this.
  11. oliran

    oliran

    Joined:
    Sep 29, 2015
    Posts:
    49
    I followed this exactly but controllers still aren't tracking. No errors or warnings. Can't figure it out... Unity 2021.3.12
     
  12. fumobox

    fumobox

    Joined:
    Oct 19, 2014
    Posts:
    8
    I had same issue.
    I finally found that I needed to set an action here.

    upload_2023-1-5_12-42-34.png
     
  13. roamerfree

    roamerfree

    Joined:
    Apr 2, 2022
    Posts:
    6
    I think it is a typo, but the rotation action reference in the picture should be "XRI Lefthand/rotation", instead of "XRI Head/rotation".
     
    fumobox likes this.
  14. achill113

    achill113

    Joined:
    Aug 30, 2020
    Posts:
    2
    Did you ever figure out your issue? I’m having the same problem. I did find that if I build and play, it works, but if I just hit the play button, the controllers will not track. Very annoying.
     
  15. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    275
    @achill113 ,
    If you use the latest non-preview version of XRI (v2.2.0) and import the Starter Assets sample package, are you able to run the Demo Scene in there without having to build? This scene was designed to work pretty much out of the box with only a bit of configuration in XR Plugin Management.
     
  16. HopefulDeveloper

    HopefulDeveloper

    Joined:
    Jan 17, 2022
    Posts:
    10
    Using XRI (v2.2.0) and Starter Assets sample package, I could not get the controllers to track in the DemoScene without removing the OpenXR plugin via the package manager. In XR Plug-in Management I had only Oculus plugins checked. It seems at least with using a Quest 2, having the OpenXR plugin in your project makes the demo scene controllers not track position.
     
  17. achill113

    achill113

    Joined:
    Aug 30, 2020
    Posts:
    2
    I just tried the demo (after upgrading to v2.2.0) and the controllers do not work there either. I did also try removing the OpenXR Plugin from my project, and it still did not work.
     
  18. gPerry

    gPerry

    Joined:
    Nov 27, 2013
    Posts:
    21
    It is working for me with OpenXR. Did you add controller profiles to both Desktop and Android in the OpenXR settings?
     
    kascope_dmarfurt and killyox like this.
  19. GWPGearWorx

    GWPGearWorx

    Joined:
    Apr 29, 2007
    Posts:
    336
    I am having an issue with one VIVE users hands not tracking, I have the profiles in windows tab but it's needed to have them also active in the Android tab even when it is not an android build? Did you add anything special to the hand controllers on the game rig?
     
  20. gPerry

    gPerry

    Joined:
    Nov 27, 2013
    Posts:
    21
    Sorry, I'm only testing on Quest 2. I don't have access to VIVE and I'm not currently using hand tracking. If it is hand tracking you are looking at, then that would likely be a separate problem.
     
  21. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    275
    @GWPGearWorx,
    Can you post a screenshot of your Project Settings under XR Plug-in Management > OpenXR configuration? I'm wondering if you are missing the Vive Controller Profile in there. It could also be that something on your XR Controller (Action-based) in the Complete XR Origin Setup may have some missing wiring.
     
  22. markasuter

    markasuter

    Joined:
    May 20, 2019
    Posts:
    24
    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! I'm cross-posting this in a few related "controllers not tracking" threads, sorry if that's frowned upon.
     
    RiverExplorer and Ndogg27 like this.
  23. Dannark

    Dannark

    Joined:
    Jul 24, 2016
    Posts:
    14
    Im also having the same problem in PICO 4.
    Here is my setup: print 1.png print 2.png

    The controllers works when playing on PC but once I build it for the pico, only the head works.
    It is even weird because It was working fine few days ago in the pico

    If I change the action base controller to Device controller, it works but that is not a good solution.

    The DemoScene is also having the same problem. Im using the v2.2.0. I've tried to reinstalling it but didn't work.

    Then I tried to update to the version v2.3.0 didnt work either. I reinstaled package management, nothing. I dont what else to do
     
    Last edited: Mar 25, 2023
  24. Dannark

    Dannark

    Joined:
    Jul 24, 2016
    Posts:
    14
    Ok, after some testing I did try to run with the profiler enabled and I got some logs erros from the console:

    Autoconnected Player "Autoconnected Player" DllNotFoundException: Unable to load DLL 'AudioPluginOculusSpatializer'. Tried the load the following dynamic libraries: Unable to load dynamic library 'AudioPluginOculusSpatializer' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "AudioPluginOculusSpatializer" not found


    And also two of this:

    Autoconnected Player "Autoconnected Player" Could not create a device for 'PICO PICO Touch Controller OpenXR (XRInputV1)' (exception: System.ArgumentException: Expected control 'devicePose' to be of type 'PoseControl' but is of type 'PoseControl' instead!
    Parameter name: path
    at UnityEngine.InputSystem.InputControl.GetChildControl[TControl] (System.String path) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.XR.OpenXR.Features.Interactions.PICOTouchControllerProfile+PICOTouchController.FinishSetup () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.InputSystem.InputControl.CallFinishSetupRecursive () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.InputSystem.InputDevice.Build[TDevice] (System.String layoutName, System.String layoutVariants, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription, System.Boolean noPrecompiledLayouts) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.InputSystem.InputManager.AddDevice (UnityEngine.InputSystem.Utilities.InternedString layout, System.Int32 deviceId, System.String deviceName, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription, UnityEngine.InputSystem.InputDevice+DeviceFlags deviceFlags, UnityEngine.InputSystem.Utilities.InternedString variants) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.InputSystem.InputManager.AddDevice (UnityEngine.InputSystem.Layouts.InputDeviceDescription description, System.Boolean throwIfNoLayoutFound, System.String deviceName, System.Int32 deviceId, UnityEngine.InputSystem.InputDevice+DeviceFlags deviceFlags) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.InputSystem.InputManager.OnNativeDeviceDiscovered (System.Int32 deviceId, System.String deviceDescriptor) [0x00000] in <00000000000000000000000000000000>:0 )


    The first error is probably because I'm using WIT oculus service for STT (speech-to-text) but the second seems to be related to the two controllers, the error doesnt make much sence in my opinion so I decided to ask chat-gpt about the erro and he gave me some nice hints about this problem as well a link to a similar erro founded here: Question - No position and rotation input from Pico Neo 3 controllers - Unity Forum

    Deleting Oculus XR did no effect to me, Im thinking that it might be due to the oculus integration that I'm using (I read from others that it works with pico, prehabs it do not)
     
    Last edited: Mar 25, 2023
  25. unity_J1Z8cLXAtvLrrw

    unity_J1Z8cLXAtvLrrw

    Joined:
    Jun 20, 2021
    Posts:
    3
    Hello! Has anyone been able to use the Pico4 controls? I have tried but only the helmet works for me. For me it's a configuration issue. Here I attach my settings.


    https://ibb.co/crpMH8k
     
  26. neodubzero11

    neodubzero11

    Joined:
    Feb 21, 2020
    Posts:
    1
    For PICO, here's a solution to controller tracking/buttons (assuming the PICO Touch Controller Interaction Profile is added and you're using InputSystem):
    • Check the warning tab for this "warning CS0618: 'PoseControl' is obsolete: 'OpenXR.Input.PoseControl is deprecated. Please use UnityEngine.InputSystem.XR.PoseControl instead.'"

    • or the Android Logcat for "Error Unity Could not create a device for 'PICO PICO Touch Controller OpenXR (XRInputV1)' (exception: System.ArgumentException: Expected control 'devicePose' to be of type 'PoseControl' but is of type 'PoseControl' instead!"
    If you see either of those, open PICOTouchControllerProfile.cs, and change
    using PoseControl = UnityEngine.XR.OpenXR.Input.PoseControl;
    to
    using PoseControl = UnityEngine.InputSystem.XR.PoseControl;

    PICO Controllers not working using OpenXR plugin
     
  27. kascope_dmarfurt

    kascope_dmarfurt

    Joined:
    Oct 9, 2014
    Posts:
    4
    This fixed it for me! My editor was set to target the Android platform so I didn't see any reason to configure the PC settings, but adding the Oculus Touch Controllers Profile to the PC side of XR Integration settings got the controllers to finally track properly. Thanks!
     
  28. ttesla

    ttesla

    Joined:
    Feb 23, 2015
    Posts:
    16
    I'm using Unity 2021.3.25f1 and Quest 2.
    Tested this on both my project and clean project with Xr Interaction Toolkit Sample scene.

    Something broken with the new xr interaction profile settings. My hand controllers stopped working in my builds. It happened after I tested the new hand tracking feature. The thing is they just work fine in Unity Editor when testing the project with airlink. But when I make build controllers just stay on the floor and tracking is not working. No error logs on console btw. (Didn't try with the profiler enabled like @Dannark did)

    With try and error I found if I remove "Meta Quest TouchPro Controller Profile" from the profiles list, it started to work again! I thought we need to add all the profiles that we support here. At least it shouldn't break the controller tracking. I guess this is a bug. @VRDave_Unity

    bug.png
     
  29. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    275
    @ttesla,
    Thanks for the heads up on this one. We are aware of the issue and are still investigating internally. Feel free to upvote this issue-tracker link to help it get more love. :)
     
    ttesla likes this.
  30. Hiten2012

    Hiten2012

    Joined:
    Dec 12, 2014
    Posts:
    14
    Same issue. Tried almost everything above mentioned.
     
  31. ScareFire

    ScareFire

    Joined:
    Jan 7, 2022
    Posts:
    1
    I'm unity 2022.3.5f using XR TK 2.4.3 with a Quest 2
    I fixed my controllers not showing tks to @ttesla and @HopefulDeveloper, let me recap a bit of the bugs in our very specific case:
    - having 'Oculus' and 'OpenXR' selected at the same time in *Project Settings > XR Plug-in Management* wil trigger the bug, at least on pc, didn't tried on Standalone
    - having both 'Oculus Touch Controller Profile' and 'Meta Quest Pro Controller Profile' in *Project Settings > XR Plug-in Management > OpenXR > Interaction Profiles* will also trigger the bug

    I hope this helps anyone, good app development !
     
    RiverExplorer and ttesla like this.
  32. unity_E689A8827B3C59AC4AA1

    unity_E689A8827B3C59AC4AA1

    Joined:
    Aug 2, 2023
    Posts:
    12
    This bug is still present, @VRDave_Unity what is the status on fixing it? Its really an issue not being able to use both interaction profiles without it killing tracking on the quest 2
     
  33. jorgefernandeztello

    jorgefernandeztello

    Joined:
    Feb 15, 2023
    Posts:
    2
    Im a bit late, i suppose, but this is what worked for me, hope it helps someone :)