Sandbox.VR.VRTrackedObject/TrackingTypes TrackingType { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The TrackingType property of the VRTrackedObject class specifies which parts of the transform should be updated. This can include rotation, position, or both, depending on the selected tracking type. This property is crucial for determining how the VR tracked object's transform is synchronized with the VR hardware.

Usage

To use the TrackingType property, you need to set it to one of the values defined in the VRTrackedObject.TrackingTypes enumeration. This will dictate which aspects of the transform (position, rotation, or both) are updated based on the VR device's tracking data.

Example

// Example of setting the TrackingType property
VRTrackedObject vrTrackedObject = new VRTrackedObject();
vrTrackedObject.TrackingType = VRTrackedObject.TrackingTypes.PositionAndRotation;

// This will update both the position and rotation of the GameObject
// based on the VR device's tracking data.