📜  2 旋转统一 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:56.759000             🧑  作者: Mango

代码示例1
// Rotation scripting with Euler angles correctly.
// Store the Euler angle in a class variable, and only use it to
// apply it as a Euler angle, but never rely on reading the Euler back.
        
float x;
void Update () 
    {
        x += Time.deltaTime * 10;
        transform.rotation = Quaternion.Euler(x,0,0);
    }