Rigidbody の角度
Rigidbody.rotation は物理エンジンを使用して Rigidbody の位置を取得や設定が行えます。Rigidbody.rotation を使用して Rigibody の回転を変更する場合、次の物理シミュレーションステップの後 Transform は更新されます。すなわち、Transform.rotation の場合、すべてのアタッチされた Collider が Rigidbody に対して回転を再計算することになるので、Transform.rotation を使用して rotation をアップデートするより速く行えます。
継続的にリジッドボディを回転したい場合、interpolation(補間)を考慮に入れて MoveRotation を代わりに使用します。
function Start () { GetComponent.<Rigidbody>().rotation = Quaternion.identity; }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Start() { GetComponent<Rigidbody>().rotation = Quaternion.identity; } }