-
Notifications
You must be signed in to change notification settings - Fork 415
Description
One issue that we currently have with input sources is that if we have two controllers of the same type without different handedness (think Vive controllers prior to handedness estimation) and then one of them disconnects we have no way of indicating which one it was outside of tracking the pose frame to frame and trying to identify which one the remaining controller is closest to, which... 🤢
The Gamepad API addresses this by leaving holes in the gamepads array, so that a single controller remains in the same index for the lifetime of it's connection. Developers are opinionated about this approach.
I would propose instead that we should use the Gamepad.index attribute to uniquely identify devices within a session. The value should be something that monotonically increases with each newly connected device and doesn't actually correspond to the element index in the array at all, which allows us to avoid array gaps. Thoughts?