Game Rig

Home/Blog/Slip angle

Slip angle: the physics of a drift

A tyre that is not slipping is a tyre making no cornering force, which is the part every arcade handling model gets wrong first.

A wheel rolling exactly in the direction it points makes no sideways force at all. Push it sideways and it pushes back. That is the trick a pneumatic tyre performs, and it means the first number a driving game has to compute is not a force but an angle.

The slip angle is the angle between where a wheel points and where it is travelling. Wikipedia states it in the wheel's own frame as alpha equal to minus the arctangent of the lateral velocity over the forward velocity. Driving straight it is a fraction of a degree; mid-drift it is measured in tens of degrees.

Drift Circuit computes one line of it per step: slip = Math.atan2(vs, Math.abs(vf) + 1), where vf is the velocity along the car's nose and vs is the velocity across it. The plus one keeps a stationary car from dividing its way into an angle it does not have. Every other number in the handling model is downstream of that line, including the boost meter.

Slip angle is one atan2 call

There is no tyre here, so there is no slip ratio, no carcass deflection and no contact patch. What there is: a velocity vector, a heading, and the angle between them. Project the velocity onto the nose to get vf, project it onto the car's right to get vs, and take the arctangent of the two. The result is signed, and the sign matters, because a car sliding left and a car sliding right need corrections in opposite directions.

Rotating into the car's frame is also what keeps the drawn sprite honest. The number the model reacts to and the number a player can see in the chase camera are then the same number. That stops being true when a game keeps a drift boolean and a decay timer and animates the slide separately from the physics, and once the two disagree the car reads either as on rails or as ice.

The other half of an honest model is that heading and velocity are integrated separately. Drift Circuit stores vx, vy and a heading angle, turns the heading with steering input, and re-derives vf and vs from the two every step. Let the heading follow the velocity instead and the slip angle is zero by construction, which is exactly what the kinematic bicycle model assumes, and exactly why it cannot drift.

Why grip rises with slip instead of saturating

A real tyre's lateral force climbs steeply at small slip angles, bends over, and peaks. Sim-racing writing puts that peak at six to ten degrees on a racing tyre. A car feels planted well before that, because cornering force cannot exist without some slip: a tyre at zero slip angle is a tyre generating nothing.

The tempting shortcut is a fixed grip rate applied against lateral velocity. That model has no steady state. Hold the drift key and the rear keeps rotating, because the only force opposing the slide does not grow as the slide gets worse. A smaller constant only slows the same runaway.

Drift Circuit adds a term proportional to the slip angle instead. On the road that is GRIP_ROAD = 11.0 plus GRIP_SLOPE = 14.0 times the absolute slip angle, per second. On the handbrake it is GRIP_DRIFT = 2.4 plus DRIFT_SLOPE = 4.5. Because the damping grows with the angle, the slide acquires an equilibrium rather than an escape velocity, and that equilibrium lands between 25 and 30 degrees. Grip rising with slip is a spring on the slide, and a rate in units per second only means anything when it is applied against a fixed step.

What the model gives up is the falling branch of the tyre curve. A real tyre's force declines past six to ten degrees; this one keeps climbing until the car stops rotating. Losing the drop means losing the snap of a genuine breakaway, which is the largest single difference between this handling and a sim. In exchange the car never enters a state a player cannot recover from.

Cutting lateral grip to 2.4 with the handbrake

The drift key does not add a force to the car. It removes one. Lateral grip falls from 11.0 to 2.4, which is 22 percent of what the rear axle had a moment earlier, and the slide starts because the same corner at the same speed now demands far more grip than is left. Steering authority rises at the same time and at both ends of the range: turn rate is 1.45 radians per second at the top of the speed range and 3.30 at rest, and the drift key moves those to 2.45 and 3.70.

Both changes are needed. Removing grip alone gives a car that slides but cannot be pointed anywhere. Adding steering alone gives a car that turns harder without ever losing the rear. The pair is what produces an angle a player can hold, and the angle is what the boost meter pays in: charge accrues only above SLIP_MIN = 0.30 radians, about 17 degrees, and only while the car is moving forward above 90 units per second.

Lateral speed implied by a slip angle, computed as forward speed times the tangent of the angle
Slip angleAt 30 km/hAt 90 km/hAt 150 km/h
2 degrees0.29 m/s0.87 m/s1.46 m/s
5 degrees0.73 m/s2.19 m/s3.65 m/s
10 degrees1.47 m/s4.41 m/s7.35 m/s
20 degrees3.03 m/s9.10 m/s15.18 m/s
30 degrees4.81 m/s14.43 m/s24.08 m/s

Those are forward speeds of 8.33, 25 and 41.7 metres per second, and the multiplication is arithmetic done here rather than a measurement of anything. It explains why the angle on its own is not the interesting quantity. Thirty degrees of slip at 30 km/h is 4.8 metres per second of sideways motion, which a contact patch can absorb. The same thirty degrees at 150 km/h is 24 metres per second, which is a crash. Drift Circuit pays boost by multiplying the slip angle above the threshold by forward speed, so the meter tracks the product this table shows rather than the angle in isolation.

What the friction circle costs, and what this model does not pay

The Pacejka Magic Formula writes lateral force as D times the sine of C times the arctangent of a term in B, E and the slip angle, with D the peak force, C the shape of the curve, B the stiffness at zero slip and E the curvature around the peak. The part worth taking from it is not the curve but the constraint sitting behind it: the combined longitudinal and lateral force stays inside a circle whose radius is the friction coefficient times the vertical load.

That constraint is why a driver cannot brake at the limit and turn at the limit simultaneously. Every newton spent slowing the car is a newton unavailable to the contact patch for changing direction. Turning while braking trades one for the other, and that trade is the whole content of trail braking.

Drift Circuit does not model the circle. Longitudinal and lateral velocity are integrated as separate scalars and neither spends the other's budget, so the car can brake at full force and hold a full slide at once. The tell is a corner taken under trail braking that feels easier than it should. Adding the circle means solving for a combined force magnitude each step, which is one square root and one angle. The other end of the same problem is parking, where the slip angle stays under a degree and the entire tyre model can be discarded in favour of geometry alone.

Pros and cons

Pros

  • One arctangent call produces a signed, physical number that the handling model, the camera and the HUD can all read from the same source.
  • Grip that grows with slip gives the slide an equilibrium, which is the difference between a drift that can be held and a spin already in progress.
  • The whole model is five constants, and each one maps to something a driver can feel: 11.0 is a road tyre, 2.4 is a handbrake.
  • Because the slip angle is the boost condition rather than a separate drift flag, the payout is continuous and cannot be farmed by twitching the wheel.

Cons

  • Cutting the tyre curve at its rising branch removes breakaway snap, so the car never punishes a driver the way a real rear axle does.
  • Ignoring the friction circle lets the car brake and slide at the same time, which quietly makes trail braking easier than it deserves to be.
  • A gain that grows with the error is a feedback loop, and a step that is too long overshoots the equilibrium into an oscillation that shorter steps would not produce.
  • Slip is measured at the car's centre rather than at each wheel, so the two axles cannot disagree and understeer is not representable at all.

Sources