Camera in Godot 4: it is Camera3D now
By Eduardo Orellana · Updated
Camera is called Camera3D in Godot 4, and ClippedCamera is gone in favour of SpringArm3D. In a Godot 4 project, extends Camera fails to parse with Could not find base class "Camera".
AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.
Intel or AMD Chromebook, with Linux turned on.
What Godot is checking
GDScript resolves the class after extends when the script loads. Camera is not a class in Godot 4, so the script fails to parse and nothing in it runs.
The converter carries Camera to Camera3D and ClippedCamera to Camera3D too. make_current() and the current property select the active camera as before; fov is still in degrees.
Reproduce it
A Godot 3 script that extends Camera, in a Godot 4 project. The scene is one Node carrying it.
extends Camera
func _ready():
print("ready")
What Godot 4.7.2 prints
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org
SCRIPT ERROR: Parse Error: Could not find base class "Camera".
at: GDScript::reload (res://answers/camera-in-godot-4/repro.gd:1)
ERROR: Failed to load script "res://answers/camera-in-godot-4/repro.gd" with error "Parse error".
at: load (modules/gdscript/gdscript_resource_format.cpp:46)Fix it
A Camera3D script that sets its field of view.
extends Camera3D
func _ready() -> void:
fov = 60.0
print(get_class(), " fov ", fov, ", far ", far)
What the fixed script prints
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org
Camera3D fov 60.0, far 4000.0Verified on Godot 4.7.2
Both scripts on this page were run headless on Godot 4.7.2 (4.7.2.stable.mono.official.ed1daf0bf) on 18 October 2026, and the output above is what Godot printed, unedited.
Where the check lives in Godot's source: [renames_map_3_to_4.cpp line 1465, Camera to Camera3D](https://github.com/godotengine/godot/blob/4.7.2-stable/editor/project_upgrade/renames_map_3_to_4.cpp#L1465), [Camera3D class reference](https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/Camera3D.xml).
Questions
- How do I keep a third-person camera out of walls?
- Put the Camera3D under a SpringArm3D, which casts toward the camera and pulls it in when something is in the way.
- What is the 2D camera called?
- Camera2D, unchanged, though its current property became enabled with make_current().
Related
- SpringArm in Godot 4: it is SpringArm3D now
- Spatial in Godot 4: it is Node3D now, and translation is position
- Every verified Godot 4 answer
- ClippedCamera in Godot 4: use a SpringArm3D with a Camera3D
- Reference in Godot 4: it is RefCounted now
- Listener in Godot 4: it is AudioListener3D now
- SpotLight in Godot 4: it is SpotLight3D now
- KinematicBody in Godot 4: it is CharacterBody3D now
Flockbay's agent reads Godot's debugger output and fixes errors like this one in your project, on the official Godot.
Download Flockbay free