Description
The PoseSource
property of the VRTrackedObject
class specifies which tracked object should be used to update the transform of the GameObject. This property is crucial for determining the source of the positional and rotational data that will be applied to the GameObject, such as a VR controller or headset.
Usage
To use the PoseSource
property, you need to set it to one of the available PoseSources
enumeration values. This will determine which VR device's data is used to update the GameObject's transform.
For example, if you want the GameObject to follow the left VR controller, you would set the PoseSource
to the corresponding value for the left controller in the PoseSources
enumeration.
Example
// Example of setting the PoseSource property
VRTrackedObject vrTrackedObject = new VRTrackedObject();
vrTrackedObject.PoseSource = VRTrackedObject.PoseSources.LeftController;
// This will make the GameObject's transform update based on the left VR controller's position and rotation.