ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.04k stars 257 forks source link

Increasing trackedDevices limit from 16 to 64 (or at least a few more)? #708

Open guiglass opened 4 years ago

guiglass commented 4 years ago

I am using SteamVR 2.0 plugin in my Unity game and currently can only access 16 tracked device. We are using many trackers and basestations here and have quickly exceeded the number of available devices.

I have read recently that SteamVR can allow for up to 64 trackedDevices to 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

But they say "developers can add support with their own code" and no more information is given.

Is adding more devices possible? Which files would need to be modified?

I attempted to define more devices in EIndex but still only 16 devices were working in the game:

namespace Valve.VR { public class SteamVR_TrackedObject : MonoBehaviour { public enum EIndex { None = -1, Hmd = (int)OpenVR.k_unTrackedDeviceIndex_Hmd, Device1, Device2, Device3, Device4, Device5, Device6, Device7, Device8, Device9, Device10, Device11, Device12, Device13, Device14, Device15, //Add more devices Device16, Device17, Device18 }

Currently I am not able to find any information or a solution for methods to enable more devices in the SteamVR Unity plugin. Is this possible?

And thank you so much for any assistance!!

zite commented 4 years ago

You may want to try the OpenVR Unity XR beta. I'm not positive if it will work for your use case but there's a better chance as it's a new plugin using the legacy input system (which is what you have to do to use that many trackers anyway). Here's a link: https://steamcommunity.com/app/250820/discussions/7/2268069450205612646/

guiglass commented 4 years ago

This sounds really great and I have just tested and created a simple VR player using a couple TrackedPoseDrivers.

I think this will be a very heavy lift for our project as we rely on the existing interaction system and skeletal input for our game.

But thank you very much for mentioning this latest beta to me. I will keep it on the radar.

However I am curious why it is not possible to increase to a few more tracked devices using SteamVR 2.0 Unity plugin?

Also do you foresee the OpenVR Unity XR ever supporting the current interaction system?

Thank you so much!!