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

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.

Source: https://flockbay.com/godot/spatial-in-godot-4/ · Updated 2026-10-30

## 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)
```

## Run this fix with your agent

Flockbay is the Godot editor with an AI agent built in. Paste this into Flockbay's chat, or into Claude Code or Codex connected to Flockbay over MCP: the agent finds the cause in your project, applies the fix, runs the game headless and reads Godot's output to check it.

```
My Godot project was written for Godot 3 and Godot 4 stops on this: "Parse Error: Could not find base class "Spatial".". Port every use to Godot 4. 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. Then run the game headless and check Godot's output for errors.
```

## 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.

Download Flockbay free: Flockbay's agent reads Godot's debugger output and fixes errors like this one in your project, on the official Godot. https://flockbay.com/download/

Related: [MeshInstance in Godot 4: it is MeshInstance3D now](/godot/meshinstance-in-godot-4/), [Camera in Godot 4: it is Camera3D now](/godot/camera-in-godot-4/), [DirectionalLight in Godot 4: it is DirectionalLight3D now](/godot/directionallight-in-godot-4/), [ARVROrigin in Godot 4: it is XROrigin3D now](/godot/arvrorigin-in-godot-4/), [Reference in Godot 4: it is RefCounted now](/godot/reference-in-godot-4/), [Every verified Godot 4 answer](/godot/), [Does Flockbay change my Godot project?](/docs/does-flockbay-change-my-godot-project/)
