WheelFrictionCurve.stiffness 刚度


var stiffness : float

Description描述

Multiplier for the extremumValue and asymptoteValue values (default 1).

用于extremumValue和asymptoteValue值的倍数(默认为1)。

Changes the stiffness of the friction. Setting this to zero  will completely disable all friction from the wheel.

改变摩擦的刚度,设置为零将完全禁用车轮的所有摩擦。

Usually you modify stiffness to simulate various ground materials (e.g. lower the stiffness  when driving on grass).

通常修改stiffness来模拟各种地面材质(例如,草地具有较低的刚度)。

参见:WheelCollider.GetGroundHit.

// 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;}}


,