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.drag 阻力
var drag : float
Description描述
The drag of the object.
物体的阻力。
Drag can be used to slow down an object. The higher the drag the more the object slows down.
阻力可用来减缓物体的速度。阻力越高物体减慢越快。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OpenParachute() {
rigidbody.drag = 20;
}
void Update() {
if (Input.GetButton("Space"))
OpenParachute();
}
}
function OpenParachute() {
rigidbody.drag = 20;
}
function Update() {
if (Input.GetButton ("Space")) {
OpenParachute();
}
}
最后修改:2011年1月29日 Saturday 15:58