Skip to main content

VRTrackedDevice

A class in Root.Township, Alta.XR.

Client: drives a transform from a tracked VR pose (head or hand) after each input update and before rendering. Make one with AddTracking, dispose it to stop.

Constructors​

1 private and internal constructor
MemberWhat it is
private VRTrackedDevice(Transform transform, TrackedPoseDriver.TrackedPose pose, VRTrackedDevice.PositionPostProcessor positionPostProcessor)Creates a VRTrackedDevice from transform, pose and positionPostProcessor.

Fields​

3 private and internal fields
MemberWhat it is
private TrackedPoseDriver.TrackedPose poseWhich tracked pose is read.
private VRTrackedDevice.PositionPostProcessor positionPostProcessorOptional callback that can change the position before it's applied.
private Transform transformTransform being driven.

Methods​

MemberWhat it is
static VRTrackedDevice AddTracking(Transform transform, TrackedDevice device, VRTrackedDevice.PositionPostProcessor positionPostProcessor = null)Starts driving the transform from the given device or pose, with an optional position post-processor.
static VRTrackedDevice AddTracking(Transform transform, TrackedPoseDriver.TrackedPose pose, VRTrackedDevice.PositionPostProcessor positionPostProcessor = null)Starts driving the transform from the given device or pose, with an optional position post-processor.
void Dispose()Stops updating the transform.
1 private and internal method
MemberWhat it is
private void UpdatePosition()Reads the pose and sets the local position (after the post-processor) and rotation.

Used in​

Members of other types that take, return or hold a VRTrackedDevice: