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

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

代码示例2
transform.eulerAngles = Vector3.forward * degrees;
// or
transform.rotation = Quaternion.Euler(Vector3.forward * degrees);
// or
transform.rotation = Quaternion.LookRotation(Vector3.forward, yAxisDirection);
// or
transform.LookAt(Vector3.forward, yAxisDirection);
// or
transform.right = xAxisDirection;
// or
transform.up = yAxisDirection;