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.worldCenterOfMass 世界重心
var worldCenterOfMass : Vector3
Description描述
The center of mass of the rigidbody in world space (Read Only).
在世界坐标空间的刚体的重心。(只读)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
Debug.Log(rigidbody.worldCenterOfMass);
}
}
Debug.Log(rigidbody.worldCenterOfMass);
最后修改:2011年2月9日 Wednesday 15:09