Skip to content

StaticBody in Godot 4: it is StaticBody3D now

By Eduardo Orellana · Updated

StaticBody is called StaticBody3D in Godot 4. In a Godot 4 project, extends StaticBody fails to parse with Could not find base class "StaticBody".

AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.

Intel or AMD Chromebook, with Linux turned on.

Download for macOSDownload for WindowsDownload for Linux

What Godot is checking

GDScript resolves the class after extends when the script loads. StaticBody is not a class in Godot 4, so the script fails to parse and nothing in it runs.

The converter carries StaticBody to StaticBody3D. A static body moved by script, such as a moving platform, should be an AnimatableBody3D in Godot 4, so bodies standing on it are carried along.

Reproduce it

A Godot 3 script that extends StaticBody, in a Godot 4 project. The scene is one Node carrying it.

More on this: KinematicBody in Godot 4: it is CharacterBody3D now

GDScript
extends StaticBody

func _ready():
	print("ready")

What Godot 4.7.2 prints

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

SCRIPT ERROR: Parse Error: Could not find base class "StaticBody".
   at: GDScript::reload (res://answers/staticbody-in-godot-4/repro.gd:1)
ERROR: Failed to load script "res://answers/staticbody-in-godot-4/repro.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)

Fix it

A StaticBody3D with a box collision shape.

GDScript
extends StaticBody3D

func _ready() -> void:
	var shape := CollisionShape3D.new()
	shape.shape = BoxShape3D.new()
	add_child(shape)
	print(get_class(), " layer ", collision_layer, ", shape ", shape.shape.get_class())

What the fixed script prints

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

StaticBody3D layer 1, shape BoxShape3D

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.

Prompt
My Godot project was written for Godot 3 and Godot 4 stops on this: "Parse Error: Could not find base class "StaticBody".". Port every use to Godot 4. StaticBody is called StaticBody3D in Godot 4. In a Godot 4 project, extends StaticBody fails to parse with Could not find base class "StaticBody". 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 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 1602, StaticBody to StaticBody3D, StaticBody3D class reference.

Questions

What happened to BoxShape?
It is BoxShape3D; the 3D shapes all gained the 3D suffix.
How do I make a moving platform?
Use an AnimatableBody3D and move it from an AnimationPlayer or a script; bodies on top move with it.

Flockbay's agent reads Godot's debugger output and fixes errors like this one in your project, on the official Godot.

Download Flockbay free