TrackedDeviceRole Role { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Role property of the TrackedObject class specifies which part of the body the tracked object represents. This can include roles such as waist, left shoulder, right hand, etc. It is used to identify the specific body part that the VR device is tracking, allowing for more accurate and context-aware interactions within a virtual environment.

Usage

To use the Role property, you can access it directly from an instance of the TrackedObject class. This property is read-only and provides information about the body part associated with the tracked object.

Example

// Example of accessing the Role property of a TrackedObject

// Assume trackedObject is an instance of TrackedObject
TrackedObject trackedObject = new TrackedObject();

// Get the role of the tracked object
TrackedDeviceRole role = trackedObject.Role;

// Output the role
// This could be used to determine specific logic based on the role
if (role == TrackedDeviceRole.LeftHand)
{
    // Perform actions specific to the left hand
}
else if (role == TrackedDeviceRole.Waist)
{
    // Perform actions specific to the waist
}