Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  5. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

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:
    240
    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:
    240
    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:
    240
    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:
    240
    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:
    80
    @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:
    20
    @ginconic I made a quick video that shows how to do this, hope it helps..
     
  8. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    80
    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:
    4
    @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