Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

WheelFrictionCurve

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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

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:

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.

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 forwardFriction and sidewaysFriction of the wheel, based on what material the wheel is hitting. See Also: WheelCollider.GetGroundHit, WheelHit.

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

Variables

asymptoteSlip Asymptote point slip (default 2).
asymptoteValue Force at the asymptote slip (default 10000).
extremumSlip Extremum point slip (default 1).
extremumValue Force at the extremum slip (default 20000).
stiffness Multiplier for the extremumValue and asymptoteValue values (default 1).