FreezeRotationXをオンにする
Rigidbody.constraints = RigidbodyConstraints.FreezeRotationX;
FreezeRotationYをオンにする
Rigidbody.constraints = RigidbodyConstraints.FreezeRotationY;
FreezeRotationZをオンにする
Rigidbody.constraints = RigidbodyConstraints.FreezeRotationZ;
FreezeRotationXYZ全部をオンにする
Rigidbody.constraints = RigidbodyConstraints.FreezeRotation;
Rigidbody
リジッドボディ
Constraints
回転を固定