Vehicle Sideis auto-detected and it determines which side of the vehicle is on. If it is a motorcycle use
Widthneed to be adjusted manually to fit the wheel model. Turn on gizmos to be able to see wheel gizmo.
Rim Offsetis equal to the distance between the suspension center and the rim center.
Drag Torqueis brake torque that is constantly applied to imitate rolling resistance.
Parentis a parent object to which the forces will be applied. Must have a
Use Rim Collideris true a half-circle mesh collider is generated and placed on the top half of the wheel to prevent that section of the wheel detecting objects as ground which can cause the wheel to jump suddenly. Also prevents side of the wheel from going through objects as the ground detection only happens on the bottom half of the tire thread.
Visualis a model representing the wheel. It needs to have Unity-correct rotation and centered pivot. If the rotation or pivot on the model is wrong it should be fixed either in 3D software (e.g. Blender) or by following the steps in this link. The method from the link can be applied both for rotation and pivot.
Visual Position Offsetand
Visual Rotation Offset.
Visual Rotation Offset's Z-axis can also be used to introduce wheel wobble if the wheel is damaged.
Max Forceis the maximum force the spring will be able to exert when fully compressed.
Max Lengthis the maximum extended spring length. Unlike in Unity's
WheelColliderthere is no target spring position setting as the spring will fully extend (as it should) when in the air. Therefore, the resting length of the spring is not known beforehand. Because of that the best way to position the vehicle to be in its resting position is to enter play mode, let the vehicle settle and then copy over the
Force Curveis an
AnimationCurvewith normalized values on both axes (both 0 to 1). X represents spring compression (0 for relaxed, 1 for compressed) and Y axis represents force. Actual X and Y maximum values are adjusted through
Bump Force- maximum damper force when damper is getting compressed.
Rebound Force- maximum damper force when damper is getting extended.
Curve- damper curve that determines relationship between spring velocity (X-axis, normalized) and force (Y-axis, normalized).
Camber At Topand
Camber At Bottomindicate camber at top and bottom of suspension travel.
Squat- as tire applies force to the ground through friction a torque in the opposite direction gets generated around wheel axle.
Squatfield determines percentage of that torque which gets transferred to the vehicle. 1 (100%) will result in rear end squatting on acceleration while -1 (-100%) will do exactly the opposite. In real world this depends on the suspension setup.
Active Friction Preset- currently active friction preset / curve. Check Friction Preset page for more info.
Slip Coefficient- coefficient by which the slip will be multiplied. Can be used to modify friction behavior without modifying currently active curve.
Force Coefficient- coefficient by which the tire friction force will be multiplied. Roughly equal to
Friction Curve's Pacejka Parameters.
Tire's grip increases with load placed on it. How much depends on the tire but in most tires this grip/load relation is linear until certain point when it starts to level off.
Load Grip Curve imitates that relation where X-axis represents percentage (0 to 1) of
Maximum Tire Load and Y-axis represents percentage (0 to 1) of
Maximum Tire Grip Force. Wheel behavior heavily depends on these values.
When the suspension bottoms out a piece of code run that prevents the wheel from going through the ground. This behaves as a very stiff spring and damper, effectively emulating the rubber bump stops on a real vehicle.
Depenetration Spring- The amount of force applied (coefficient) in proportion to the penetration depth. Behaves similar to the normal suspension spring.
Depenetration Damper- The amount of force applied (coefficient) in proportion to the wheel velocity. Reduces the amount of bounce-back on impact. Similar to the regular suspension damper.
Ground detection in WheelController happens by firing one or multiple
Raycasts and working out from those the shape of the terrain. This is heavily optimized and raycasts are batched. Still, number of rays does affect performance as there is some post-processing of received hit data required.
Longitudinal Scan Resolutionand
Lateral Scan Resolutiondetermine the resolution of the grid of rays that will be cast.
Apply Force To Others- if true wheel will interact with other Rigidbodies.
Raycast is used to detect ground the wheel will also detect other objects, such as the vehicle itself. To prevent this a
Layer Mask is used. By default
Auto Setup Layer Mask is ticked and all the layers assigned to the
Parents (Vehicle's) colliders will be automatically removed from the
Layer Mask (i.e. will be ignored).
Layer Maskmanually it is important to also un-tick
Defaultas body collider layer.
Debug sections shows the most important values of the wheel.
Debugto show more detailed debug gizmos.
Suspension Force Magnitudevalue can be used to balance the vehicle's weight distribution. Adjust Rigidbody's center of mass until all wheels have the same force magnitude on the flat surface to get 50/50 weight distribution. If using WheelController asset adjusting center of mass is done through an included script, if using NWH Vehicle Physics 2 this is done through Settings tab of