ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
352 stars 82 forks source link

Rift Controller Serial numbers conflict when binding rift controllers #90

Open wirelessdreamer opened 5 years ago

wirelessdreamer commented 5 years ago

With the Oculus SDK installed, and Rift selected as the controller to bind this error shows in the console:

Oculus Rift CV1 TrackingReference:System.ArgumentException: An element with the same key already exists in the dictionary.

Dumping the controller config that that check is done on shows: {"m_serialNumber":"Oculus Rift CV1 TrackingReference","m_modelNumber":"Oculus Rift CV1 TrackingReference","m_renderModelName":"Oculus Rift CV1 TrackingReference","m_deviceClass":4,"m_deviceModel":8,"m_isPoseValid":true,"m_isConnected":true,"m_isOutOfRange":false,"m_isCalibrating":false,"m_isUninitialized":false,"m_velocity":{"x":0.0,"y":0.0,"z":0.0},"m_angularVelocity":{"x":0.0,"y":0.0,"z":0.0},"m_position":{"x":0.979028582572937,"y":1.4850271940231324,"z":1.4623607397079468},"m_rotation":{"x":-0.009936640970408917,"y":-0.2502443790435791,"z":-0.0006187591934576631,"w":-0.9681314826011658},"m_buttonPressed":0,"m_buttonTouched":0,"m_axisValue":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]}

looking at the serial number that isn't a serial number shows why with 2 controllers there is already a controller with that key.