docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method LookAt

    LookAt(float3, float3, float3)

    Returns a float4x4 view matrix given an eye position, a target point and a unit length up vector. The up vector is assumed to be unit length, the eye and target points are assumed to be distinct and the vector between them is assumes to be collinear with the up vector. If these assumptions are not met use float4x4.LookRotationSafe instead.

    Declaration
    public static float4x4 LookAt(float3 eye, float3 target, float3 up)
    Parameters
    Type Name Description
    float3 eye

    The eye position.

    float3 target

    The view target position.

    float3 up

    The eye up direction.

    Returns
    Type Description
    float4x4

    The float4x4 view matrix.

    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)