13 minutes
Guns and Bullets
A shover leans you toward the trees, and a rammer rides your door. All you can do is steer. Your car has no gun.
This lesson gives it one. It also gives the other side a gunner, so the shooting goes both ways.
Adding speeds
Throw a ball forward from a moving car and it does not start from rest. It already has the car's speed, and the throw adds its own on top:
Your machine gun's rounds leave the muzzle, the open end of the barrel, at 150 m/s. Flat out, the car does 52 m/s:
The camera rides with the car, so on screen a tracer always pulls away at 150 m/s. A round lives 0.7 s and starts at the muzzle, 2.4 m in front of the car's middle:
Leave the car's speed out, and the round does 150 m/s on the road while you chase it. Now the faster you drive, the shorter your gun:
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.