{{{ #!Markdown # CarWheel Controls the WheelCollider component for behaving as expected. Each physical wheel of the vehicle must consist of a gameObject containing a WheelCollider component and a CarWheel script. __The parameters of the CarWheel script are uniformly controlled from the [CarControl](wiki:CarControl) script__ so no parameters need to be configured here. Only configure the suspension parameters at WheelCollider. ## WheelCollider's position Place each WheelCollider object at the __outer limit of the wheel's mesh__. This will ensure the maximum stability, as the distance between the WheelColliders of the same axle will be the maximum possible. ## WheelCollider's suspension __Radius__ (m): match the wheel's radius. __Suspension Distance__ (m): distance the wheel can travel due to the suspension. __Suspension Spring > Spring__ (N): the spring sustains the weight of the vehicle. This value is the maximum force in Newtons the spring can apply when fully compressed. The more force, the higher the vehicle will rest (closer to maximum suspension distance). The less force, the closer to the top suspension limit the wheel will rest. A rough value for each spring is the half of the vehicle's weight in newtons. For instance, if the vehicle's mass is 2000 Kg, then a good spring value to start with is 2000 * 9.8 = 19600 / 2 = __9800__. __Suspension Spring > Damper__ (no idea on the units): this value means how much energy is lost when the spring compresses and extends. Low values mean a bouncy car, while high values means an inelastic suspension. Typical good values are from 300 (bouncy) to 1000 (inelastic). _Note that the Damper value is frequently (and erroneously) used as a percentage. 0-100 will always result in a bouncy vehicle._ ## Other WheelCollider's parameters - _Center_: leave the default value (0,0,0). - _Suspension Spring > Target Position_: leave the defalut value (0). - _Mass_ is absolutely meaningless, it doesn't affect anything. Must be greater than 0. - _Forward Friction, Sideways Friction_: these are calculated from the CarWheel script. The resulting values are based on the parameters configured at [CarControl](wiki:CarControl) (_ForwardWheelFriction_ / _SidewaysWheelFriction_). }}}