camera
Reads or moves the camera, in explore or combat mode. action:
read(the default): returns what it isfollowing, itsfocusand how far that is from what it follows (focusOffset), itsposition,facingDegreesandpitchDegrees, whether it istactical,zoom(1 close in, -1 the tactical view) andzoomSetting, the zoom it is easing toward. Itsprojectionis what the last frame was drawn with, for drawing the same frame elsewhere:fovDegrees(vertical),aspect(width over height, as used),nearandfarin metres, the view’swidthandheightin pixels, and Direct3D’s row-majormatrix. While another plugin’s free view flies (flycam mode),readgives only the projection.face: turns it at once so thattargetorpointis straight ahead, beyond the focus, for a screenshot that shows it. Withtilttrue it tilts as well, so the target is in the middle of the picture: use it for something above or below, such as the sky. A creature’s point is at its feet, so one standing near is looked down on.follow: makes it followtargetand jump there at once, as selecting a party member does (nothing gets selected). Use it to look at a creature elsewhere, or to centre the tactical view on one.turn: turns it tofacingDegrees, tilts it topitchDegrees, or both. The tactical view keeps its own pitch of -45 degrees, so tilt close in.behind: turns it to look the waytargetfaces, from behind it, as the game’s own camera reset does. Default: what it follows.zoom: setszoomas the mouse wheel does: -1 is the tactical view, high above, and 0.5 (farthest) to 1 (closest) the close view. The game has no view between them. The camera eases there within about a second. In the tactical view the game pans the camera while the mouse is at the picture’s edge or off it, so the party drifts to a corner (focusOffsetgrows): first hold the cursor inside the picture withpointer(apixelnear the middle), thenfollowa creature to centre on it.
Every action returns the camera as read does. A turn or tilt shows from the next frame, so take the screenshot after this call; after zoom, read until zoom has arrived. A mod that smooths camera moves treats a move from here as the player’s and stops its own.
Arguments
| Name | Type | Required | What |
|---|---|---|---|
action | "read" | "face" | "follow" | "turn" | "behind" | "zoom" | What to do. Default read. | |
target | any | With face, follow or behind: the creature or object, by id. | |
point | any | With face: a world point, {x, y, z} or [x, y, z]. | |
tilt | boolean | With face: also tilt, so the target is in the middle of the picture and not only ahead. Default false: the tilt stays as it is. | |
facingDegrees | number | With turn: the way the camera looks, measured as a creature’s facingDegrees, so a creature’s turns the camera the way it looks: 0 along -y, -90 along +x, 90 along -x, 180 along +y. | |
pitchDegrees | number | With turn: -90 to 90. 0 is level, up positive, -90 straight down. Close in, the game keeps it between -60 and 60. | |
zoom | number | With zoom: -1 for the tactical view, or 0.5 (farthest) to 1 (closest) for the close view. |
Call it as camera over MCP, or POST /api/tool/camera with the arguments as JSON.