11 minutes
Speed-Sensitive Steering
This lesson runs in the same lab as lesson 1, with your SlipMeter still on the Player.
Steering by circle size
Lesson 1.2 listed how wide the lab car turns at a few speeds. The circle grows from 14.1 m at a crawl to 59.1 m at top speed, and both numbers fall out of two lines. Call the speed as a share of top speed s, and the turn rate ω (omega, in radians a second):
Put the first line into the second and the speed cancels out, because s is the speed divided by maxSpeed:
So the s in the turn rate makes CarDrive steer by circle size, not by spin. With no falloff, full lock draws the same circle at every speed: maxSpeed ÷ steerRate, which is 13 m for the lab car. The falloff bracket, which the code calls wash, is the only thing that widens it. At top speed the bracket shrinks to 0.22, so the circle is about 4.5 times the 13 m it would be with no falloff:
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.