A static wrapper class for interfacing with tracking systems across all platforms.
TBTracking sets up tracking nodes for all of the devices needed by your game at runtime, and lets you attach / detach objects from those nodes.
- At least one platform is enabled in the Core Settings menu
- The scene contains a
- At least one tracked input type is enabled in the Input Settings menu
Get the TButt and UnityEngine.XR namespaces to reference
TBTracking in your scripts.
using TButt; using UnityEngine.XR;
You can get a reference to any node’s transform with the following function:
Transform GetTransformForNode(XRNode node)
The supported nodes are as follows:
||Left hand controller|
||Right hand controller|
||3DOF controller or tracked gamepad|
Attaching to Nodes
Use the included TBTrackedNodeHelper script, or manually attach your objects to tracking nodes at runtime.
3DOF Arm Model
The 3DOF arm model (accessible via
TB3DOFArmModel.instance) offers some features specific to that node type:
||Toggles “centered” or left / right handedness alignnment.|
||Gets the pointer transform, which may have a different alignment from the hand transform (for raycasting).|
||Gets the hand transform for the arm model.|
You can get events when nodes are connected:
||Receives the newly connected node and the transform associated with it.|