docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ComputePixelFocalLength

    ComputePixelFocalLength(float, int)

    Determines the equivalent focal length, in pixels, for a given field of view angle and image size.

    Declaration
    public static float ComputePixelFocalLength(float fov, int imageSize)
    Parameters
    Type Name Description
    float fov

    The field-of-view angle, in degrees. Can be either horizontal or vertical.

    int imageSize

    The image size, in pixels. Can be either width or height, but must match the direction of fov./>

    Returns
    Type Description
    float

    The focal length, in pixels.

    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)