docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetPosition

    GetPosition()

    Returns the current state's position. If there is no change in position, then it returns zero.

    Declaration
    public Vector3 GetPosition()
    Returns
    Type Description
    Vector3

    Vector3

    Remarks

    When there is no change in an updated state's position then there are no values to return. Checking for HasPositionChange is one way to detect this. When used with half precision it returns the half precision delta position state update which will not be the full position. To get a NettworkTransform's full position, use GetSpaceRelativePosition(bool) and pass true as the parameter.

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