Description
The TrackedDeviceType.Controller
field is a member of the TrackedDeviceType
enumeration within the Sandbox.VR
namespace. It represents tracked controllers in a virtual reality environment. This field is used to identify devices that are specifically designed to be held and manipulated by the user, such as VR hand controllers.
Usage
Use the TrackedDeviceType.Controller
field when you need to specify or check for VR devices that are controllers. This is particularly useful in scenarios where you need to handle input or interactions from VR controllers separately from other types of tracked devices, such as head-mounted displays or base stations.
Example
// Example of using TrackedDeviceType.Controller
public void HandleDeviceInput(TrackedDeviceType deviceType)
{
if (deviceType == TrackedDeviceType.Controller)
{
// Handle input from a VR controller
// For example, process button presses or track motion
}
else
{
// Handle other types of devices
}
}