Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question How can I use HTC Vive Tracker in OpenXr without setting the wearing position in SteamVR?

Discussion in 'VR' started by feathered_wing, May 23, 2023.

  1. feathered_wing

    feathered_wing

    Joined:
    Dec 5, 2020
    Posts:
    21
    I'm working on a project migration from SteamVR/OpenVR to OpenXR. But I encountered some problems when compatible with tracker:

    In past projects, I used InputDevices.GetDevices to directly obtain the number of trackers and parameters. Then use the "SteamVR_trackerObject" script on a gameobject to synchronize its position. without knowing where it represents on steamVR.
    upload_2023-5-23_11-54-32.jpeg

    But when I migrated to OpenXR, the old code and logic became invalid, so I had to use the HTCViveTrackerProfile under this answer (https://forum.unity.com/threads/openxr-and-openvr-together.1113136/). cs to get the current tracker.

    But because of this, I have to bind the position of the tracker in steamVR in advance, and I don't want the user to do this binding one more step. Is there any way to get the position and rotation of the tracker that is not bound in SteamVR? Or pose?
    upload_2023-5-23_11-59-28.png
    upload_2023-5-23_11-59-52.png
     

    Attached Files: