Search Unity

Vive Tracker - cannot see it in Unity

Discussion in 'AR/VR (XR) Discussion' started by dmennenoh, May 7, 2017.

  1. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
    Have one of the new trackers and cannot get it to show up. It shows in SteamVR status as connected and tracking. I have the update poses script attached to Camera (eye). I have a sphere as a child of the camera rig and have a steamVR tracked object script attached to it. In the steamVR controller manager of the main camera rig I have added the sphere as a tracked object to the array.
    As soon as I hit play the sphere is grayed out from the hierarchy. Have followed a couple of online tuts but cannot figure this out.
    PS - also have two of the normal vive controllers but they are sitting in the box and not turned on. This project requires using a tracker only.
     
  2. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
    Update: I got the tracker to be seen in Unity now. It seems both controllers need to be on for the tracker object to not be immediately turned inactive.
    Anyone know how to remedy this? It seems to be something with the SteamVR Controller Manager script in how it assigns the controllers to the tracked object array.
     
  3. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
    Update again: In the SteamVR Controller Manager - line 233 - additional controllers are only assigned if both left and right have been assigned first. I simply commented out that if statement and now the tracker is found with both controllers off.

    Now I don't think this is the right way about this, but for now it works.
     
    SBS_Shrek and musepuckel like this.
  4. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
    After more messing with this tracker I think I have a better way to use the tracker without the controllers, and without modifying the SteamVR Controller Manager code. I removed the Tracked Object scripts from the controller objects in the camera rig. Then in the Controller Manager component set the Object array size to 0, Set the Left Controller to None (Game Object) and then set the Right Controller to your tracker.
    This seems to work for me and I can turn on a LED through the haptic pogo pin. However I'm still having trouble moving an object (a sphere) around with the tracker.
     
  5. solidearthvr

    solidearthvr

    Joined:
    Jan 23, 2017
    Posts:
    50
    Check out the following tutorial for controlling objects with the trackers:
     
  6. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    @dmennenoh any 'news' on this issue? I've been trying to get 2 (and more) trackers to work and I've been through hell for the past 2 months. I need to assign given objects to given trackers, but they often get reassigned or mixed up. The only way I got this to work was without removing the 2 controllers from the setup, but then it works only when the controllers are on, which in my case is undesirable. Any info would be of great help!
     
  7. Ikik

    Ikik

    Joined:
    Oct 19, 2012
    Posts:
    23
    @ginconic I made a quick video that shows how to do this, hope it helps..
     
  8. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Sorry to reply so late to this. I was on a short deadline with this and the client was going berserk. I only now logged back in and saw your post. I actually ended up recoding the entire controller manager and removed the controllers completely. I.e. similar to your solution, but a lot more extreme. We were using 3 trackers, which was pretty troublesome.

    For anyone looking for a solution to this, I can vouch that @Ikik's link above does indeed provide a nice and easy fix.
     
  9. petergraham003

    petergraham003

    Joined:
    May 5, 2018
    Posts:
    14
    @Ikik , @ginconic When I tried the solution mentioned above in the video, the tracker is being grayed out in Unity after 1 sec of going into PlayMode and rightContoller gameObject is being set to active from then and I am getting this error "Attempting to set a device feature value type that is not supported by VRInputInstance. This will result in an incomplete state". Could you please let me know, on how to use tracker with both Vive controllers turned OFF