docs.unity.cn
    Show / Hide Table of Contents

    Method Euler

    Euler(float3, math.RotationOrder)

    Returns a quaternion constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...).

    Declaration
    public static quaternion Euler(float3 xyz, math.RotationOrder order = math.RotationOrder.ZXY)
    Parameters
    Type Name Description
    float3 xyz

    A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians.

    math.RotationOrder order

    The order in which the rotations are applied.

    Returns
    Type Description
    quaternion

    The quaternion representing the Euler angle rotation in the specified order.

    Euler(Single, Single, Single, math.RotationOrder)

    Returns a quaternion constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...).

    Declaration
    public static quaternion Euler(float x, float y, float z, math.RotationOrder order = default(math.RotationOrder))
    Parameters
    Type Name Description
    Single x

    The rotation angle around the x-axis in radians.

    Single y

    The rotation angle around the y-axis in radians.

    Single z

    The rotation angle around the z-axis in radians.

    math.RotationOrder order

    The order in which the rotations are applied.

    Returns
    Type Description
    quaternion

    The quaternion representing the Euler angle rotation in the specified order.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 29, 2022
    Terms of use