docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method GetVerticalFieldOfView

    GetVerticalFieldOfView(Camera, float)

    Calculates the vertical field of view from an aspect neutral (diagonal) field of view and the camera's aspect ratio.

    Declaration
    public static float GetVerticalFieldOfView(this Camera camera, float aspectNeutralFieldOfView)
    Parameters
    Type Name Description
    Camera camera

    The camera to get the aspect ratio from.

    float aspectNeutralFieldOfView

    The "aspect neutral" field of view, which is the diagonal field of view.

    Returns
    Type Description
    float

    The vertical field of view calculated.

    Remarks

    The field of view property of a Unity Camera stores the vertical field of view.

    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)