cameraRigs.package
This package holds more than this page lists. See all of its files in its world.
README.md
controller.orbit
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, andasset.list("component")lists each one under that name.
Orbit camera controller. Orbits around a target entity or position. Mouse drag to rotate, scroll to zoom, optional auto-rotate.
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 orbit: the entity, its id or its name, kept as an entity reference; unset orbits Camera.follow, else targetX/Y/Z), targetX, targetY, targetZ, distance, minDistance, maxDistance, sensitivity, zoomSpeed, autoRotate, autoRotateSpeed.
Controls: RMB drag to rotate, scroll to zoom.
entity(id).component.add("cameraRigs.orbit", { target = "player", distance = 10 })