A more advanced car controller for the Godot game engine.
Custom rigidbody car controller with raycast suspension for the Godot game engine. This one is a bit more realistic than the built-in vehiclebody with wheelcolliders. Also easy to extend to be even more on the simulation side of vehicle controllers.
As of January 6th 2022 all 3 tire models now use combined slip!
Features:
- RWD, FWD and AWD drivetypes available
- 3 different tire models to choose from: simple pacejka model, brush tire model and one using godot curves.
- Tire wear
- Fuel consumption using BSFC
- Torque curve for the engine
- Simple engine sound
- Choose between preloaded limited slip diff, open diff and locked diff/solid axle
- Manual clutch with adjustable clutch friction force
- Manual gearbox
- Different surfaces have different friction
This project would not have been possible without Wolfes written tutorial of his own car simulator physics. Also huge thank you to Bastiaan Olij for his vehicle demo. See the links in the Acknowledments section for more info.
Keyboard:
- Arrow keys for throttle, brake and steering
- Space for handbrake
- A for upshifting and Z for downshifting
- c for clutch
Xbox controller:
- R2 for throttle and L2 for braking
- Left analog stick for steering
- A button for upshifting and X button for downshifting
- B button for handbrake
- LB for clutch
Make sure the physics FPS is set to atleast 120 or the physics start to get weird. In this project it is set to 240, which works fine for me.
This project is licensed under the MIT License - see the LICENSE.md file for details. This project also contains models and textures owned by their authors. See links below for exact licenses.
Engine sound sample found in /sounds folder is made with enginesound, available from https://github.com/DasEtwas/enginesound. The sound sample itself is licensed under cc0.