docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method TryGetLinearVelocity

    TryGetLinearVelocity(out Vector3)

    Retrieves the joint's linear velocity vector, if available.

    Declaration
    public bool TryGetLinearVelocity(out Vector3 linearVelocity)
    Parameters
    Type Name Description
    Vector3 linearVelocity

    Assigned the tracked linear velocity of this joint, if successful. Set to zero, if unsuccessful.

    Returns
    Type Description
    bool

    Returns true if successful and the velocity was filled out with valid tracking data, returns false otherwise.

    Remarks

    To transform to world space so that the vector has the correct direction relative to the user, rotate this by the rotation of the XROrigin.

    In This Article
    Back to top
    Copyright © 2023 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)