docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetAxisClosestValue

    GetAxisClosestValue(Vector3, Vector3)

    What axis value would we need to get as close as possible to the desired cameraPos?

    Declaration
    public float GetAxisClosestValue(Vector3 cameraPos, Vector3 up)
    Parameters
    Type Name Description
    Vector3 cameraPos

    camera position we would like to approximate

    Vector3 up

    world up

    Returns
    Type Description
    float

    The best value to put into the X axis, to approximate the desired camera pos

    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)