Spatial in Godot 4: Could not find base class "Spatial"

By Eduardo Orellana · Updated

Spatial is called Node3D in Godot 4, and its translation property is position. A Godot 3 script that extends Spatial fails to parse with Could not find base class "Spatial"; extend Node3D and use position, or global_position for the position in the world.

What Godot is checking

When GDScript loads a script it resolves the class after extends. Spatial is not a class in Godot 4, so the script fails to parse and none of it runs.

Godot 4 renamed the 3D base node to Node3D, and most 3D nodes took a 3D suffix with it: MeshInstance is MeshInstance3D, Camera is Camera3D, Area is Area3D. Its 3-to-4 converter carries Spatial to Node3D and translation to position in its renames table.

Reproduce it

A Godot 3 3D script in a Godot 4 project. The scene is one Node3D with this script.

extends Spatial

func _ready():
	translation = Vector3(1, 2, 3)
	print(translation)

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 "Spatial".
   at: GDScript::reload (res://answers/spatial-in-godot-4/repro.gd:1)
ERROR: Failed to load script "res://answers/spatial-in-godot-4/repro.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)

Fix it

Extend Node3D and set position. global_position is the position in the world, which Godot 3 code read from global_transform.origin.

extends Node3D

func _ready() -> void:
	position = Vector3(1, 2, 3)
	print("position ", position, ", global_position ", global_position)

What the fixed script prints

Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org

position (1.0, 2.0, 3.0), global_position (1.0, 2.0, 3.0)

Verified 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 6 October 2026, and the output above is what Godot printed, unedited.

Where the check lives in Godot's source: [gdscript_analyzer.cpp line 572, the message](https://github.com/godotengine/godot/blob/4.7.2-stable/modules/gdscript/gdscript_analyzer.cpp#L572), [renames_map_3_to_4.cpp line 1595, Spatial to Node3D](https://github.com/godotengine/godot/blob/4.7.2-stable/editor/project_upgrade/renames_map_3_to_4.cpp#L1595), [renames_map_3_to_4.cpp line 1169, translation to position](https://github.com/godotengine/godot/blob/4.7.2-stable/editor/project_upgrade/renames_map_3_to_4.cpp#L1169).

Questions

Where did rotation_degrees and scale go?
They kept their names on Node3D: rotation_degrees, rotation and scale. The property that changed name is translation, now position.