用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:wheelfrictioncurve:wheelfrictioncurve

WheelFrictionCurve 轮摩擦曲线

Description 描述

WheelFrictionCurve is used by the WheelCollider to describe friction properties of the wheel tire.

WheelFrictionCurve用于WheelCollider来描述轮胎的摩擦力属性。

The curve takes a measure of tire slip as an input and gives a force as output. The curve is approximated by a two-piece spline. The first section goes from (0,0) to (extremumSlip,extremumValue), at which point the curve's tangent is zero. The second section goes from (extremumSlip,extremumValue) to (asymptoteSlip,asymptoteValue), where curve's tangent is again zero:

该曲线取轮胎滑移计算作为输入以及一个给定的力作为输出。该曲线近似由两段曲线构成。第一段从(0,0)到(extremumSlip, extremumValue)到(asymptoteSlip, asymptoteValue),这里曲线的切线再次为零。

Wheel collider computes friction separately from the rest of physics engine, using a slip based friction model. It separates the overall friction force into a “forwards” component (in the direction of rolling, and responsible for acceleration and braking) and “sideways” component (orthogonal to rolling, responsible for keeping the car oriented). Tire friction is described separately in these directions using WheelCollider.forwardFriction and WheelCollider.sidewaysFriction. In both directions it is first determined how much the tire is slipping (what is the speed difference between the rubber and the road). Then this slip value is used to find out tire force exerted on the contact.

轮碰撞器使用基于滑动摩擦模型,物理引擎静止时分别计算摩擦力。它分离整体摩擦力到“向前”组件(滚动的方向,并负责加速和制动)和“侧滑”组件(垂直于滚动方向,负责保持车辆的方向)。轮胎的摩擦力在这些方向上分别使用WheelCollider.forwardFriction和WheelCollider.sidewaysFriction。描述在两个方向上它首先决定轮胎滑动了多少(橡胶和路面之间速度的不同),然后这个滑动值用来找到在接触点上轮胎受到的力。

The property of real tires is that for low slip they can exert high forces as the rubber compensates for the slip by stretching. Later when the slip gets really high, the forces are reduced as the tire starts to slide or spin. Thus tire friction curves have a shape like in the image above.

真实的轮胎属性是较慢的滑动将获得较高的力因为橡胶通过拉伸补偿滑动,然后当滑动变的较高时,这个力被减小因为轮胎开始滑动或旋转。因此轮胎摩擦力曲线具有上图所示的形状。

Because the friction for the tires is computed separately, the PhysicMaterial of the ground does not affect the wheels. Simulation of different road materials is done by changing the WheelCollider.forwardFriction and WheelCollider.sidewaysFriction of the wheel, based on what material the wheel is hitting.

因为轮胎的摩擦力是分别计算的,地面的PhysicMaterial不会影响车轮。通过改变车轮所碰到的forwardFriction和sidewaysFriction来模拟不同的路面材质。

See Also: WheelCollider, WheelCollider.forwardFriction, WheelCollider.sidewaysFriction.

常用参数通俗解释:
1、Forward是motorTorque和brakeTorque的前后移动力。
2、Sideway是转向力,也就是脚本中的steerAngle。
3、Stiffness刚度,可以理解为地面摩擦力。
4、Extremum(极值)和Asymptote(渐近线),前者控制开始起步,后者表示匀速过程,比如,骑自行车的时开始会感到吃力,而后不需要那么用力。。
5、slip和Value是控制起步和匀速的位置和摩擦力系数,slip控制什么程度开始进入匀速;Value控制已经起步和匀速状态时的摩擦力(Stiffness)生效程度了。

Variables 变量

asymptoteSlipAsymptote point slip (default 2).
渐进线滑动点(默认为2)。
asymptoteValueForce at the asymptote slip (default 10000).
在渐进线滑动上的力(默认为10000)。
extremumSlipExtremum point slip (default 1).
滑动极值点(默认为1)。
extremumValueForce at the extremum slip (default 20000).
滑动极值的力(默认为20000)。
stiffnessMultiplier for the extremumValue and asymptoteValue values (default 1).
用于extremumValue和asymptoteValue值的倍数(默认为1)。
script/unityengine/classes/wheelfrictioncurve/wheelfrictioncurve.txt · 最后更改: 2016/08/02 05:32 (外部编辑)