Class TrackedPoseDriver | XR Legacy Input Helpers | 2.0.8
docs.unity3d.com
    Show / Hide Table of Contents

    Class TrackedPoseDriver

    The TrackedPoseDriver component applies the current Pose value of a tracked device to the transform of the GameObject. TrackedPoseDriver can track multiple types of devices including XR HMDs, controllers, and remotes.

    Inheritance
    Object
    TrackedPoseDriver
    TrackedPoseDriverTests.TestTrackedPoseDriverWrapper
    Namespace: UnityEngine.SpatialTracking
    Syntax
    [Serializable]
    public class TrackedPoseDriver : MonoBehaviour

    Fields

    m_OriginPose

    Declaration
    protected Pose m_OriginPose
    Field Value
    Type Description
    Pose

    Properties

    deviceType

    This is used to indicate which pose the TrackedPoseDriver is currently tracking.

    Declaration
    public TrackedPoseDriver.DeviceType deviceType { get; }
    Property Value
    Type Description
    TrackedPoseDriver.DeviceType

    originPose

    Declaration
    public Pose originPose { get; set; }
    Property Value
    Type Description
    Pose

    poseSource

    The pose being tracked by the tracked pose driver

    Declaration
    public TrackedPoseDriver.TrackedPose poseSource { get; }
    Property Value
    Type Description
    TrackedPoseDriver.TrackedPose

    trackingType

    The tracking type being used by the tracked pose driver

    Declaration
    public TrackedPoseDriver.TrackingType trackingType { get; set; }
    Property Value
    Type Description
    TrackedPoseDriver.TrackingType

    updateType

    The update type being used by the tracked pose driver

    Declaration
    public TrackedPoseDriver.UpdateType updateType { get; set; }
    Property Value
    Type Description
    TrackedPoseDriver.UpdateType

    UseRelativeTransform

    This is used to indicate whether the TrackedPoseDriver will use the object's original transform as its basis.

    Declaration
    public bool UseRelativeTransform { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    Awake()

    Declaration
    protected virtual void Awake()

    FixedUpdate()

    Declaration
    protected virtual void FixedUpdate()

    OnBeforeRender()

    Declaration
    protected virtual void OnBeforeRender()

    OnDestroy()

    Declaration
    protected virtual void OnDestroy()

    OnDisable()

    Declaration
    protected virtual void OnDisable()

    OnEnable()

    Declaration
    protected virtual void OnEnable()

    PerformUpdate()

    Declaration
    protected virtual void PerformUpdate()

    SetLocalTransform(Vector3, Quaternion, PoseDataFlags)

    Declaration
    protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRotation, PoseDataFlags poseFlags)
    Parameters
    Type Name Description
    Vector3 newPosition
    Quaternion newRotation
    PoseDataFlags poseFlags

    SetPoseSource(TrackedPoseDriver.DeviceType, TrackedPoseDriver.TrackedPose)

    This method is used to set the device / pose pair for the SpatialTracking.TrackedPoseDriver. setting an invalid combination of these values will return false.

    Declaration
    public bool SetPoseSource(TrackedPoseDriver.DeviceType deviceType, TrackedPoseDriver.TrackedPose pose)
    Parameters
    Type Name Description
    TrackedPoseDriver.DeviceType deviceType

    The device type that we wish to track

    TrackedPoseDriver.TrackedPose pose

    The pose source that we wish to track

    Returns
    Type Description
    Boolean

    true if the values provided are sensible, otherwise false

    TransformPoseByOriginIfNeeded(Pose)

    Declaration
    protected Pose TransformPoseByOriginIfNeeded(Pose pose)
    Parameters
    Type Name Description
    Pose pose
    Returns
    Type Description
    Pose

    Update()

    Declaration
    protected virtual void Update()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023