Log inGet started
Package

cameraRigs.package

This package holds more than this page lists. See all of its files in its world.

README.md

controller.rts

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.

RTS camera controller. Top-down strategy camera. WASD to pan (aligned to camera yaw), scroll to zoom, right-click drag to rotate. Optionally lock to a target entity.

Public fields: inputMap (the camera-rig scheme, cameraRigs.inputMaps.cameraRig, by default; point it at a world's own map to rebind this camera), target (the entity to follow: the entity, its id or its name, kept as an entity reference; unset follows Camera.follow, else pans free with WASD), centerX, centerY, centerZ, distance, minDistance, maxDistance, moveSpeed, sensitivity, zoomSpeed, minPitch, maxPitch.

Controls: WASD to pan, scroll to zoom, RMB drag to rotate.

entity(id).component.add("cameraRigs.rts", { distance = 15, moveSpeed = 12 })