Tag Info

New answers tagged


For a very minimalistic car you won't need anything other than two values: velocity and direction. Both values can be just a floating point number. When steering left/right, adjust the direction, which could be as simple as being the angle the car is facing. Accelerating or breaking will modify the velocity. if (key_left) direction -= 0.001; else if ...

Top 50 recent answers are included