Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Node3D

Inherits: Node < Object

Inherited By: AudioListener3D, AudioStreamPlayer3D, BoneAttachment3D, Camera3D, CollisionObject3D, CollisionPolygon3D, CollisionShape3D, GridMap, ImporterMeshInstance3D, Joint3D, LightmapProbe, Marker3D, NavigationLink3D, NavigationObstacle3D, NavigationRegion3D, OccluderInstance3D, OpenXRHand, Path3D, PathFollow3D, RayCast3D, RemoteTransform3D, ShapeCast3D, Skeleton3D, SpringArm3D, VehicleWheel3D, VisualInstance3D, XRBodyModifier3D, XRFaceModifier3D, XRHandModifier3D, XRNode3D, XROrigin3D

Most basic 3D game object, parent of all 3D-related nodes.

Description

Most basic 3D game object, with a Transform3D and visibility settings. All other 3D game objects inherit from Node3D. Use Node3D as a parent node to move, scale, rotate and show/hide children in a 3D project.

Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the Node3D object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the Node3D's transform. The word local below refers to this coordinate system. The coordinate system that is attached to the Node3D object itself is referred to as object-local coordinate system.

Note: Unless otherwise specified, all methods that have angle parameters must have angles specified as radians. To convert degrees to radians, use @GlobalScope.deg_to_rad.

Note: Be aware that "Spatial" nodes are now called "Node3D" starting with Godot 4. Any Godot 3.x references to "Spatial" nodes refer to "Node3D" in Godot 4.

Tutorials

Properties

Basis

basis

Basis

global_basis

Vector3

global_position

Vector3

global_rotation

Vector3

global_rotation_degrees

Transform3D

global_transform

Vector3

position

Vector3(0, 0, 0)

Quaternion

quaternion

Vector3

rotation

Vector3(0, 0, 0)

Vector3

rotation_degrees

RotationEditMode

rotation_edit_mode

0

EulerOrder

rotation_order

2

Vector3

scale

Vector3(1, 1, 1)

bool

top_level

false

Transform3D

transform

Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

NodePath

visibility_parent

NodePath("")

bool

visible

true

Methods

void

add_gizmo(gizmo: Node3DGizmo)

void

clear_gizmos()

void

clear_subgizmo_selection()

void

force_update_transform()

Array[Node3DGizmo]

get_gizmos() const

Node3D

get_pa