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

Bug XRInteraction Tool kit not working with Htc Vive?

Discussion in 'VR' started by zyonneo, Mar 24, 2021.

  1. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    I tried the following steps but after that when I hit play I am still stuck at Htc vive home screen. Scene is not loading in VR.Tried a couple of times still same problem.

    Unity version Used 2020.3.0f1

    1) Open XR Plugin version 1.0.3 - Installed
    2)Project Settings > XRPlugin management OpenXR Check-Yes => Fix All
    3)Project Settings > XRPlugin management > OpenXR > Features > Htc vive Controller Profile Check-Yes
    4)XRInteraction Tool kit Version 0.10.0-preview.7 - Installed
    5)Player Settings > Active Input Handling - Input System Package(New)
    6)In hierarchy right click XR > Room Scale XR Rig(Action-based)
    7)Package Manager > XRInteraction Tool Kit(Already Installed) > Default Input Actions > Imported
    8)In Assets\Samples\XR Interaction Toolkit\0.10.0-preview.7\Default Input Actions\XRI Default Left Controller -Added to ActionBasedController default
    9)In Assets\Samples\XR Interaction Toolkit\0.10.0-preview.7\Default Input Actions\XRI Default Right Controller -Added to ActionBasedController default
    10)In Player Setting > Preset Manager > XRI Default Left Controller - typed 'Left' on the given textbox.
    11)In Player Setting > Preset Manager > XRI Default RightController - typed 'Right' on the given textbox.
    12)Deleted Old XR Rig from hierarchy and added Right click > XR > Room Scale XR Rig(Action-based).(XR Controller script actions have values)
    13)Added Input Action Manager to XR Rig and added 'XRI Default Input Actions' to Element 0.(Added only 1 to Action Assets).

     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    Hello! So, Vive support is directly handled by HTC. Please share this on their developer forums and their teams will help.
     
  3. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    Go to project settings, XR Plug-In Management, openXR and make sure that OpenXR Runtime is set to SteamVR.
     
    M0DNAREN0EM0S likes this.
  4. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    Is there a reason for that? I am trying to figure out how to get Vive trackers working in Unity with UnityXR/OpenXR and I am not finding any luck anywhere.
     
  5. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    The working group is discussing an extension for Vive trackers, but it's not done yet. I don't think there's any way to do it yet.
     
  6. dariony

    dariony

    Joined:
    May 16, 2015
    Posts:
    19
    @TreyK-47 technically not so in this case unless it's the Vive Cosmos OpenXR runtime you are referencing. @thep3000 you are correct, work in progress, update coming soon
     
    Last edited: May 30, 2021
  7. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    I have a similar problem, but only on one PC, on others it works fine. On those the Runtime is set to "System Default".
    When I try the same on the other PC, nothing happens when I start playmode.
    The Rigs camera is at 0 0 0, and does not react, the HMD stays black, steam VR is not started automatically like on the others.
    When I look at UnityEngine.XR.InputDevices.GetDevices(inputDevices); the VIVE HMD is in the list.

    When I set the Runtime to "Steam VR" something else happens:
    When SteamVR is not loaded and I start the scene with the VR rig, SteamVR starts and the HMD is recognized and works properly. When I now stop playmode, and try it again, nothing happens again, HMD has no picture and is not tracked.
    It also does not work when I don't start the VR scene directly but through another. Then SteamVR is opened when the playmode is started. When I now load the VR scene, it does not work, HMD has no picture and is not tracked.

    What can have such affect?
    One thing that is different from the other PCs: It has also the Oculus Software installed.


    And one other thing: The VIVE works fine. Since
    A) it works at other PCs,
    B) it works on this PC with the legacy VR system in old projects.

    So it must have to do something with the Unity XR Management
     
  8. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    Can you attach editor logs when it doesn't work? It sounds like in the first scenario it's not finding / starting the openxr runtime - could be the system default is set improperly? I'm not sure what's happening in the second scenario where you force runtime to steamvr - maybe steamvr isn't initializing properly. Logs might give more details.
     
  9. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    I tried it today and it worked now...

    Yesterday I deinstalled the Oculus Software, Mabe it is related to that. But then I had not that effect right away.
     
  10. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    "make sure that OpenXR Runtime is set to SteamVR." how is that done?
    upload_2023-5-18_18-22-56.png
    I dont see any such option in Unity 2020.3.47 which is what the XRI example 2.3.2 is built in
    https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples
    Interactions for HTC and Index are set up
    upload_2023-5-18_18-25-37.png
    But when you hit play nothing tracks the headsets or controllers.
    All looks good in the Project Validation.
    upload_2023-5-18_18-27-7.png
    So what am I missing?
     
  11. lianne13

    lianne13

    Unity Technologies

    Joined:
    Jan 31, 2023
    Posts:
    21

    Attached Files:

  12. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    @LianneUnityXR Thank you this was done and the scene still fails to load. It just hangs and I have to go to the task manager and close Unity. If I wait a few minutes I hear a poping noise as if the scene has started and the play button turns from gray to blue but the headset shows nothing and the controllers have no interaction.
    No console errors just failure to load.
    upload_2023-5-24_8-7-3.png
    Tested with Vive Pro Eye and Valve Index on two desktop PCs.

    I tried on another PC and got a bunch of errors about URP and everything turned pink but only after hitting play. Filed a bug report.
     
    Last edited: May 24, 2023
  13. ShelbyJ

    ShelbyJ

    Unity Technologies

    Joined:
    Apr 24, 2023
    Posts:
    10
    Hey @Giantbean

    Could you provide me with the tracker ID so I can look into it further on my end?
     
  14. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    Where do I find that? The email has a "Check Report Status" button but when I go to that site the email and password used to log into UnityID fails to let me into the service desk. (Another bug :| )
    Is the Case-in # the same as a tracker ID perhaps? Try 41917
     
    ShelbyJ likes this.