Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

cameraRig.inputMap

The controls a camera rig reads: move, look and zoom for a camera the player nudges while the cursor stays theirs: an isometric or top-down view, a strategy camera, an orbit rig.

ControlKeyboard + mouseGamepadTouch
moveWASDLeft stickLeft stick
lookMouse, while the right button is heldRight stickDrag the right zone
zoomScroll wheelShouldersPinch

The player clicks in the world these cameras show, so the cursor stays where it is for the whole session and aiming reads a right-button drag. @builtin::inputMaps.default is the scheme for a camera the player aims with their whole view. It takes the cursor, and mouse movement steers on its own.

look's right button is read as free: a world that binds the right button to an action of its own gets that action from a right-drag, and this camera keeps look on the pad stick and the touch zone.

The group is camera, which composes with whatever a world has live: a vehicle that stands the player group down leaves the camera those controls are watched through where it is.

entity.find("cam").component.add("@builtin::controller.isometric", { target = "player" })

Every camera behaviour that reads this map takes an inputMap field, so a world points one at its own map without touching the behaviour.