- Home /
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?
Thanks in advance!
SB
Answer by Edy · Jun 08, 2010 at 05:51 PM
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.
I agreed forward slip is m/sec But sidewayslip in road dynamics books are in angles i.e. arctan(longitudinal speed/lateral speed of tire) so what is the unit of wheelhit.sidewaysSlip ??
Answer by e-bonneville · Apr 22, 2010 at 12:08 PM
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...
When Commenting on an aswer you should use the comment functionality rather than making a new answer.
Answer by JeyP4 · May 11, 2018 at 10:46 PM
Hey guys I found something officialy declared by unity.
Your answer
Follow this Question
Related Questions
Car CG and WheelHit.forwardSlip questions 1 Answer
Adjusting tire smoke particle emitter based on wheel slip 1 Answer
Simple arcade car Physics 0 Answers
using wheel colliders? 4 Answers