Skip to content
Edit this page

Camera2D

Frames the view: the screen centers on this node's global position.

Inherits: Node2D → Node

Properties

Camera2D

Property Type Default Description
zoom number 1 View scale; larger values show less of the world. Multiplied by the window fit scale.
smoothing bool false Smoothly interpolate the camera toward its target position.
smoothing_speed number 5 Exponential smoothing rate when smoothing is enabled; higher values snap faster.
limit_left int -10000000 Minimum world X coordinate visible on the left edge of the camera.
limit_top int -10000000 Minimum world Y coordinate visible on the top edge of the camera.
limit_right int 10000000 Maximum world X coordinate visible on the right edge of the camera.
limit_bottom int 10000000 Maximum world Y coordinate visible on the bottom edge of the camera.

Node2D

Property Type Default Description
position vec2 (0, 0) Local position in world units, relative to the parent. Global position is this plus every ancestor's.
rotation number 0 Rotation around the node's origin. Stored in radians; the inspector edits degrees.
z_index int 0 Draw order index. Nodes with higher values are drawn on top. Ties fall back to tree order.