IReadOnlyList<TrackedObject> TrackedObjects { get; set; }

robot_2Generated
code_blocksInput

Description

The TrackedObjects property provides a read-only list of all available VR trackers. These trackers represent various tracked objects in the VR environment, such as controllers, headsets, or other devices that are being tracked by the VR system.

Usage

To access the list of tracked objects, you can use the TrackedObjects property from an instance of VRInput. This property is useful for iterating over all tracked devices and obtaining their current state or position.

Example

// Accessing the list of tracked objects
var trackedObjects = VRInput.Current.TrackedObjects;

// Iterating over each tracked object
foreach (var trackedObject in trackedObjects)
{
    // Perform operations with each tracked object
    // For example, logging the position
    var position = trackedObject.Transform.Position;
    // Use the position as needed
}