I’ve been playing around with vehicle physics in Godot for a few years, and over time I developed a few suitable cameras to help me test things out more easily. I decided to turn them into a plugin for ease of use, and to share with other people.
It’s mostly intended for prototyping, but perhaps it could also serve as the basis for something more. A couple of example scenes are included in the plugin.
You can download it from the asset library, or from the Github repo.
Currently it provides:
- a chase camera, that smoothly chases the vehicle and automatically rotates around it
- an orbit camera, controlled with the mouse to orbit around the car, and zoom in and out
- an on-car camera, which can cycle through several user-defined perspectives around (or in) the car
- a cockpit camera that can be controlled with the mouse to look around
- a race-track camera, which automatically changes between user-defined positions around the race-track to follow the player car
You can use one or more of them as you please, in one or more player cars. (All cameras except the race-track camera should go inside the vehicle scene, or at least be children of the vehicle node.)
The plugin creates a singleton that should automatically manage all the cameras in the scene tree, and allows you to switch cameras and camera positions. Using them should require minimal to no setup, depending on the camera (see docs).
The automatic nature of the plugin is something I’m experimenting with. Hopefully it works well for other people as it works for me.