Rigidbody.position 位置

var position : Vector3


The position of the rigidbody.


This is similar to setting transform.position, however the position 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.position,然而position只在物理步结束应用到变换。 如果你想连续移动一个刚体或运动学刚体,使用MovePosition和MoveRotation代替。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		rigidbody.position = Vector3.zero;
function Start () {
	rigidbody.position = Vector3.zero;
Page last updated: 2011-2-9