Rigidbody
- AddExplosionForce
- AddForceAtPosition
- AddForce
- AddRelativeForce
- AddRelativeTorque
- AddTorque
- angularDrag
- angularVelocity
- centerOfMass
- ClosestPointOnBounds
- collisionDetectionMode
- detectCollisions
- drag
- freezeRotation
- GetPointVelocity
- GetRelativePointVelocity
- inertiaTensorRotation
- inertiaTensor
- interpolation
- isKinematic
- IsSleeping
- mass
- maxAngularVelocity
- MovePosition
- MoveRotation
- OnCollisionEnter
- OnCollisionExit
- OnCollisionStay
- position
- rotation
- SetDensity
- sleepAngularVelocity
- sleepVelocity
- Sleep
- solverIterationCount
- SweepTestAll
- SweepTest
- useConeFriction
- useGravity
- velocity
- WakeUp
- worldCenterOfMass
Rigidbody.position 位置
var position : Vector3
Description描述
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;
}
最后修改:2011年2月9日 Wednesday 16:08