Skip to main content

Introduction to 3D in Godot

Godot Engine provides a comprehensive 3D system built around nodes that inherit from Node3D, the base class for all spatial objects. Understanding the 3D coordinate system, transformations, and scene organization is essential for creating 3D games and applications.

The 3D Coordinate System

Godot uses a right-handed coordinate system where:
  • X axis: Points to the right (red)
  • Y axis: Points upward (green)
  • Z axis: Points backward (blue)
In Godot, the forward direction is -Z (Vector3.FORWARD), which means objects face in the negative Z direction by default.

Coordinate Spaces

Godot distinguishes between different coordinate spaces:

Local Space

Coordinates relative to the node’s own transform. Also called “object-local coordinate system.”

Parent Space

Coordinates relative to the parent node’s transform (unless top_level is true).

Global Space

Coordinates relative to the world origin, independent of parent transforms.

Node3D: The Base Class

Node3D is the fundamental building block for all 3D nodes in Godot. Every 3D object inherits from this class.
In Godot 3 and older versions, Node3D was called Spatial.

Key Properties

Transform Properties

Common Transformation Methods

Translation

Rotation

All angle parameters in Godot methods use radians by default. Use deg_to_rad() to convert from degrees.

Look At

Make a node face a target position:
See look_at() method at doc/classes/Node3D.xml:127

Coordinate Conversion

3D Scene Structure

A typical 3D scene hierarchy follows this pattern:
1

Create Root Node

Start with a Node3D as your scene root for spatial organization.
2

Add Camera

Place a Camera3D to define the viewport perspective.
3

Add Lighting

Use DirectionalLight3D for sunlight or other light types for specific effects.
4

Build Environment

Add WorldEnvironment for sky, fog, and ambient lighting.
5

Create Objects

Add meshes, physics bodies, and interactive elements.

Visibility Control

See visibility methods at doc/classes/Node3D.xml:95-99, 249-253

Advanced Transform Features

Top Level Nodes

When top_level is true, the node ignores parent transformations (doc/classes/Node3D.xml:350).

Orthonormalization

See orthonormalization at doc/classes/Node3D.xml:150-154

Transform Notifications

Getting Parent Relationships

See doc/classes/Node3D.xml:58-63, 65-70

Best Practices

All rotation methods expect radians. Always use deg_to_rad() when working with degrees:
Non-uniform scaling can cause issues with physics and some nodes:
For local movement (like moving forward), use translate_object_local():
Only call force_update_transform() when absolutely necessary (like in physics operations), as it has performance costs:

Common Patterns

Moving an Object Forward

Orbiting Around a Point

Smooth Following

Meshes and Materials

Learn about rendering 3D geometry

Lighting

Explore 3D lighting techniques

Physics

Understand 3D physics simulation

Camera

Master camera controls and perspectives

Resources