WheelHit.collider 碰撞器
var collider : Collider
Description描述
The other Collider the wheel is hitting.
车轮碰到的其他碰撞器。
// When attached to the WheelCollider, modifies tire friction based on
// static friction of the ground material.
//当附加到WheelCollider,基于地面材质的静态摩擦修改轮胎摩擦
function FixedUpdate() {
var hit : WheelHit;
var wheel : WheelCollider = GetComponent(WheelCollider);
if( wheel.GetGroundHit( hit ) ) {
wheel.forwardFriction.stiffness = hit.collider.material.staticFriction;
wheel.sidewaysFriction.stiffness = hit.collider.material.staticFriction;
}
}
最后修改:2011年3月20日 Sunday 10:26