Search Unity

HTC Vive Trackers and 2017.2 XR API

Discussion in 'AR/VR (XR) Discussion' started by Muuuuo, Oct 13, 2017.

  1. Muuuuo

    Muuuuo

    Joined:
    Apr 16, 2015
    Posts:
    57
    Two short but important questions.

    1. Does 2017.2 support HTC Vive trackers via TrackedPoseDriver? I couldn't get them to work at all.
    2. Does 2017.2 support HTC Vive tracker input via joystick input like it does for controllers?

    The "trackers" in question are https://www.vive.com/eu/vive-tracker/.
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    1. Not at the moment.
    2. I don't quite understand what you mean by this one.
     
  3. Muuuuo

    Muuuuo

    Joined:
    Apr 16, 2015
    Posts:
    57
    The trackers have a button that functions as the System button. They also support the other buttons via the pins underneath them. These can be queried in the same way as the other buttons when using SteamVR.

    In 2017.2 XR input can be handled in a generic way through https://docs.unity3d.com/Manual/OpenVRControllers.html. However as usual there are some critical bugs (Case 958861) in the newest Unity version and this method can't really be used reliably right now. The trackers also show up as the Right Controller instead of something else which makes differentiating them from the actual controllers difficult.

    Guess the trackers just plain don't work with the XR API yet.
     
    Last edited: Oct 16, 2017
  4. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    I'm relatively sure we're actually tracking the Pose data from the trackers, just not publishing it in the nicest way yet.

    The first tracker should come through as either TrackingReference or HardwareTracker using the VRDevice GetLocalPosition/Rotation calls.
     
  5. Muuuuo

    Muuuuo

    Joined:
    Apr 16, 2015
    Posts:
    57
    Yeah, it seems the trackers show up as HardwareTrackers.

    What's the current recommended way to track which controllers are currently turned on?
    The Case 958861 bug prevents using UnityEngine.Input.GetJoystickNames() for tracking active controllers. I'm looking for a way to get a list of XR controllers which are turned on at a given time, can differentiate between a vive tracker and a vive controller and which would be updated automatically instead of calling functions like GetJoystickNames which allocate a bunch of memory.
     
  6. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111