Log inGet started
World

Controllers

README.md

cameraRigs

In a world that installs the Controllers library (world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })), every package name on this page is written with @controllers:: in front of it, and asset.list("component") lists each one under that name.

Camera behaviors for games: a Camera names one in its behavior field and the behavior moves and turns the camera every frame. Each carries the cameraBehavior tag, so layers.active.camera.behaviors lists it once the package is installed, and orbital_follow carries playerDefault, which makes it the camera a default player is authored with.

BehaviorWhat it does
orbital_followOrbits the player on three rings (low, middle, high); look turns it, the wheel zooms, and it pulls in past walls.
third_person_followAn over-the-shoulder camera that sits behind the player and turns back behind them while they walk.
first_personThe camera at the player's eyes; seats in a FirstPersonBody.
chaseTrails a moving body from behind and above: a car, a boat, a runner.
mountRides a seat on a body: a cockpit, a hood, a turret sight.
rtsA strategy camera that pans, rotates and zooms over a map.
isometricA fixed-angle isometric camera that pans and follows.
birds_eyeLooks straight down from overhead.
orbitOrbits a point or an entity under the look and zoom controls.
side_scrollerHolds a 2.5D side view on a target.
cinematicPlays a cutscene path.
menuHolds the camera's authored pose.

camera_rig is the module the follow cameras share (follow, trail, pull-in, fades, recentring). The cameraRig input map binds move, look and zoom for the rts, isometric, birds_eye, orbit, chase and mount behaviors; the follow cameras read @builtin::inputMaps.default.

local cam = entity.spawn("cam")
cam.component.add("Camera", { behavior = asset.ref("cameraRigs.chase", "component") })
cam.component.get("cameraRigs.chase").target = car.id

documentation/choosing-a-camera says which behavior fits which game and the fields each one reads. Every behavior runs looks through the player's own camera settings (@builtin::modules.api.engine.camera_settings).