camera

Reads or moves the camera, in explore or combat mode. action:

  • read (the default): returns what it is following, its focus, position, yawDegrees and pitchDegrees, whether it is tactical, and zoom (1 close in, -1 the tactical view).
  • face: turns it at once so that target or point is straight ahead, beyond the focus, for a screenshot that shows it.
  • follow: makes it follow target and jump there at once, as selecting a party member does (nothing gets selected). Use it to look at a creature elsewhere.
  • turn: turns it to yawDegrees.

Every action returns the camera as read does. The new view shows from the next frame, so take the screenshot after this call. A mod that smooths camera moves treats a turn from here as the player’s and stops its own move.

Arguments

Name Type Required What
action "read" | "face" | "follow" | "turn"   What to do. Default read.
target any   With face or follow: the creature or object, by id.
point any   With face: a world point, {x, y, z} or [x, y, z].
yawDegrees number   With turn: the direction from the focus to the camera, in degrees, measured from +x toward +y.

Call it as camera over MCP, or POST /api/tool/camera with the arguments as JSON.