Builtin Library
README.md
Birds Eye Camera
Strict overhead camera — looks straight down (-Y world) and follows the target's X/Z position. No yaw, no pitch, no orbit; only height (zoom).
Vs. the other top-down behaviours
| Behavior | What it does | When to pick it |
|---|---|---|
birds_eye | locked overhead, follows target XZ only | tactical / map views, navigation overlays |
rts | overhead with yaw + WASD pan + RMB rotate | strategy games where the user drives the view |
isometric | fixed angle (not straight down) + WASD pan | classic isometric game-feel |
Fields
| Field | Default | Notes |
|---|---|---|
inputMap | @builtin::inputMaps.cameraRig | The map whose zoom control adjusts the height. Point it at a world's own map to rebind this camera. |
target | unset | The entity to look down on: the entity, its id or its name. An entity reference, so a scene build that writes it names the entity the build placed. Falls back to Camera.follow when unset. |
height | 25.0 | World-Y distance above target. |
minHeight | 5.0 | Scroll-zoom lower bound. |
maxHeight | 120.0 | Scroll-zoom upper bound. |
zoomSpeed | 0.15 | Multiplicative per scroll tick (exp(-scroll * zoomSpeed)). |
smoothing | 0.18 | Share of an offset change left after one second. 0 snaps, 1 never moves. The target's own motion carries the camera at any speed. |
offsetX, offsetZ | 0.0 | Constant XZ offset added to the target's position. |
Use as a camera behavior
-- World-default
world.camera_default = asset.ref("@builtin::controller.birds_eye")
-- Per-scene swap
layers.active.camera.behavior = asset.ref("@builtin::controller.birds_eye")
layers.active.camera.follow = layers.active.players.localPlayer
The component carries the cameraBehavior tag in .metadata, so the slot validation in Camera.behavior = ref will accept it.
Controls
- Scroll — adjust height (zoom in/out)
- No rotation, no panning — the target moves; the camera just follows.