Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

Camera2D

Camera2D(props): Element

A 2D game’s camera, Godot’s name: an orthographic lens that follows the player’s character in the scene’s plane, drawing into a small target upscaled by a whole number so no texel stretches, with a dead zone, damping, look-ahead, bounds and a texel shake. No drag moves it; the wheel and a pinch zoom it where minZoom and maxZoom allow, and the orbit keys and a two-finger twist turn it where orbit allows. Its look is the game’s: straight down or tilted, orthographic or perspective, pixel-perfect or smooth, expanded or cropped. It aims itself, as Godot’s Camera2D does, before the plugins’ hooks, which may move it on; follow={null} leaves the aim to them. The devtools’ free and map cameras take it over and give it back. Its frame stays on the world while it is mounted, for the room’s tile colliders and the sprites’ check.

Parameter Type
props Camera2DProps

Element