Search Unity

More than 16 trackedDevices for SteamVR plugin? I was told it's possible!

Discussion in 'AR/VR (XR) Discussion' started by Airmouse, Apr 7, 2020.

  1. Airmouse

    Airmouse

    Joined:
    Jan 12, 2019
    Posts:
    107
    In my unity game I am using SteamVR 2.0 plugin and am limited to 16 tracked devices. But I require a few more trackers for my project and have read that up to 64 trackers may be enabled:

    """
    Recently OpenVR has been updated to support up to 64 devices,but this has not been updated yet in the Unity plugins (but developers can add support with their own code).
    """


    Source (page 41):
    https://dl.vive.com/Tracker/Guideline/HTC_Vive_Tracker(2018)_Developer+Guidelines_v1.0.pdf

    In that pdf they state: "but developers can add support with their own code". How do I implement this??? Which files/lines do I change in the Unity SteamVR plugin scripts so I can utilize more trackers?

    Already I have tried increasing the number of devices in SteamVR_TrackedObject.cs but I do not know if this will work:
    Code (CSharp):
    1. namespace Valve.VR
    2. {
    3.     public class SteamVR_TrackedObject : MonoBehaviour
    4.     {
    5.         public enum EIndex
    6.         {
    7.             None = -1,
    8.             Hmd = (int)OpenVR.k_unTrackedDeviceIndex_Hmd,
    9.             Device1,
    10.             Device2,
    11.             Device3,
    12.             Device4,
    13.             Device5,
    14.             Device6,
    15.             Device7,
    16.             Device8,
    17.             Device9,
    18.             Device10,
    19.             Device11,
    20.             Device12,
    21.             Device13,
    22.             Device14,
    23.             Device15,
    24.             //Add more devices
    25.             Device16,
    26.             Device17,
    27.             Device18
    28.         }
    Can someone please help me enable more devices?
     
    Last edited: Apr 7, 2020