-
Notifications
You must be signed in to change notification settings - Fork 6
TBSteamVRDeviceManager
A wrapper that handles connection / disconnection events for Steam VR devices, and pulls their raw data into a more easily usable format that is more in line with other SDKs.
Platform must be set using TBEditorBuildSettings
tool.
A TBSteamVRDeviceManager
script will automatically be added your scene if it's needed by any other TButt scripts. It handles controller and device ID assignments. Because it is an abstraction of controller data, is mostly only useful to access directly when you want to know information about a controller without spawning a representation of it in the scene (such as in TBDaydreamController
).
A TBSteamVRDevice
object is created and updated for each tracked device.
You can access various TBSteamVRDevice
objects through the following functions:
Function | Description
--------------------------------------| ------------
`bool IsDeviceConnected(DeviceType type)` | Returns true if the requested device type is connected.
`TBSteamVRDevice GetFirstController()` | Returns the first controller connected, if any.
`TBSteamVRDevice GetRightController()` | Returns the right controller, if connected.
`TBSteamVRDevice GetLeftController()` | Returns the left controller, if connected.
Field | Description
------------| ------------
`public uint index` | The index assigned to this device.
`public bool connected` | Returns true if the device is currently connected.
`public ETrackedDeviceClass deviceType` | Controller, HMD, tracker, etc. See reference in Steam VR SDK.
`public Quaternion rotation` | The world space rotation of the device.
`public Vector3 position` | The world space position of the device.