book_4_sparkGenerated
code_blocksInput

Description

The TrackedDeviceRole.LeftHand field is a member of the TrackedDeviceRole enumeration within the Sandbox.VR namespace. It represents the role of a tracked device that is associated with the left hand in a virtual reality environment. This is useful for applications that need to differentiate between various tracked devices and their roles, such as distinguishing between left and right hand controllers.

Usage

Use the TrackedDeviceRole.LeftHand field when you need to specify or check the role of a tracked device as the left hand in your VR application. This can be particularly useful when handling input from VR controllers or when setting up VR interactions that depend on the specific role of a device.

Example

// Example of using TrackedDeviceRole.LeftHand

void HandleDeviceRole(TrackedDeviceRole role)
{
    if (role == TrackedDeviceRole.LeftHand)
    {
        // Handle input or actions specific to the left hand
        ProcessLeftHandInput();
    }
}

void ProcessLeftHandInput()
{
    // Implement logic for left hand input
}