Quaternion.Euler

Unity · Версия 2020.3 LTS · Scripting · Quaternion

Quaternion.Euler

Объявление

public static Quaternion Euler(float x, float y, float z);

Описание

Возвращает поворот на z градусов вокруг оси z, x градусов вокруг оси x и y градусов вокруг оси y; применяется именно в этом порядке.

Дополнительную информацию см. в разделе Поворот и ориентация в Unity.

using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        // A rotation 30 degrees around the y-axis
        Quaternion rotation = Quaternion.Euler(0, 30, 0);
    }
}

Объявление

public static Quaternion Euler(Vector3 euler);

Описание

Возвращает поворот на z градусов вокруг оси z, x градусов вокруг оси x и y градусов вокруг оси y.

using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        // A rotation 30 degrees around the y-axis
        Vector3 rotationVector = new Vector3(0, 30, 0);
        Quaternion rotation = Quaternion.Euler(rotationVector);
    }
}

Обновлено 17 ноября 2026 г.