# What is the Unit of "Slip" in the Wheel Collider?

Hey, all,

I need to use Wheel Colliders, and I need to detect for Slip. This is pretty easy with the slip property, but does anyone know what the unit of the returned value is? Even better, does anyone know a range so I can convert this to a percentage slip?

SB

Slip is expressed in meters per second (m/s). It's the relative speed between the wheel's contact point and the colliding surface.

The slip value is converted into longitudinal and lateral forces (Newtons) according to the forwardFriction and sidewaysFriction curves of the WheelCollider.

You can calculate a relative slip according to the definition of the friction curve:

• If slip < curve.extremumSlip, the relative slip is 0.
• If slip is between curve.extremumSlip and curve.asymptoteSlip, relative slip is the proportion between both values:

`relSlip = Mathf.InverseLerp(curve.extremumSlip, curve.asymptoteSlip, slip);`

• If slip is greater than curve.asymptoteSlip, relative slip is 1.0.

It is between 0 and 1. For instance, this code copied from the docs:

``````// Prints "braking slip!" when tire slips badly.
function FixedUpdate() {
var hit : WheelHit;
var wheel : WheelCollider = GetComponent(WheelCollider);
if( wheel.GetGroundHit( hit ) ) {
if( hit.forwardSlip > 0.5 ) {
print ("braking slip!");
}
}
}

``````

Checks if the slip is 0.5, suggesting a return value with a range from -1 to 1, because acceleration slip is returned as a negative value, while braking slip is positive. This should be pretty easy to convert to a percentage, unless you don't like the negative return value for forward slip.

Unfortunately, that isn't right - I currently check for skidding at slip == 2.0f, and that works, so it goes beyond 0-1, unfortunately...

Hey guys
I found something officialy declared by unity.