Search Unity

Set Tracker to Specific Device Index Issues

Discussion in 'AR/VR (XR) Discussion' started by nyapoke, May 3, 2018.

  1. nyapoke

    nyapoke

    Joined:
    Jan 21, 2017
    Posts:
    1
    I'm using the SteamVR Camera Rig with four trackers, and I want each tracker assigned to the correct device index programmatically instead of using the Vive Input Utility.

    I'm currently using this function:
    Code (CSharp):
    1. obj.GetComponent<SteamVR_TrackedObject>().SetDeviceIndex(index);
    where index is the device index for the tracker that obj should track.

    When I print which tracker obj is tracking every update function, its device index is set to index for 2 frames before it is set to another device index.

    I'm wondering why it changes after 2 frames, and if there is a way of making the tracker track a specific device index by setting it only once?