docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AttachPointVelocityTracker

    Tracks the velocity and angular velocity of an attachment point in an XR interaction context. It uses weighted linear regression to calculate velocities over a series of frames, providing smooth and accurate results.

    Inheritance
    object
    AttachPointVelocityTracker
    Implements
    IAttachPointVelocityTracker
    IAttachPointVelocityProvider
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Interaction.Toolkit.Attachment
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [MovedFrom("UnityEngine.XR.Interaction.Toolkit.Interaction")]
    public class AttachPointVelocityTracker : IAttachPointVelocityTracker, IAttachPointVelocityProvider

    Methods

    GetAttachPointAngularVelocity()

    Retrieves the current angular velocity of the attachment point.

    Declaration
    public Vector3 GetAttachPointAngularVelocity()
    Returns
    Type Description
    Vector3

    The current angular velocity of the attachment point as a Vector3.

    GetAttachPointVelocity()

    Retrieves the current linear velocity of the attachment point.

    Declaration
    public Vector3 GetAttachPointVelocity()
    Returns
    Type Description
    Vector3

    The current linear velocity of the attachment point as a Vector3.

    ResetVelocityTracking()

    Resets the velocity tracking data.

    Declaration
    public void ResetVelocityTracking()

    UpdateAttachPointVelocityData(Transform)

    Updates attach point velocity data using only the attachment transform.

    Declaration
    public void UpdateAttachPointVelocityData(Transform attachTransform)
    Parameters
    Type Name Description
    Transform attachTransform

    The transform of the attachment point.

    UpdateAttachPointVelocityData(Transform, Transform)

    Updates attach point velocity data using the attachment transform and an XR Origin Transform.

    Declaration
    public void UpdateAttachPointVelocityData(Transform attachTransform, Transform xrOriginTransform)
    Parameters
    Type Name Description
    Transform attachTransform

    The transform of the attachment point.

    Transform xrOriginTransform

    The XR Origin Transform for relative calculations.

    Implements

    IAttachPointVelocityTracker
    IAttachPointVelocityProvider

    Extension Methods

    AttachPointVelocityProviderExtensions.GetAttachPointAngularVelocity(IAttachPointVelocityProvider, Transform)
    AttachPointVelocityProviderExtensions.GetAttachPointVelocity(IAttachPointVelocityProvider, Transform)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)