Rigidbody.rotation 旋转

var rotation : Quaternion

Description描述

The rotation of the rigdibody.

该刚体的旋转。

This is similar to setting transform.rotation, however the rotation will only be applied to the transform at the end of the physics step. If you want to continously move a rigidbody or kinematic rigidbody use MovePosition and MoveRotation instead.

这个类似设置transform.rotation,然而rotation只在物理步结束应用到变换。 如果你想连续移动一个刚体或运动学刚体,使用MovePositionMoveRotation代替。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		rigidbody.rotation = Quaternion.identity;
	}
}
function Start () {
	rigidbody.rotation = Quaternion.identity;
}
Page last updated: 2011-2-9