docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method LookRotation

    LookRotation(float3, float3)

    Returns a quaternion view rotation given a unit length forward vector and a unit length up vector. The two input vectors are assumed to be unit length and not collinear. If these assumptions are not met use float3x3.LookRotationSafe instead.

    Declaration
    public static quaternion LookRotation(float3 forward, float3 up)
    Parameters
    Type Name Description
    float3 forward

    The view forward direction.

    float3 up

    The view up direction.

    Returns
    Type Description
    quaternion

    The quaternion view rotation.

    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)