build.focus_camera
Overview
- [Build Mode Only] Moves the build mode camera so one object - or one spot on the lot - sits in the centre of the screen, at the build camera's default zoom. This is what makes a long run of build commands watchable: point it at each object as it is placed instead of framing the whole lot, which shrinks everything to specks. Give 'entity_id' (from building.place_object or build.scan_objects) to follow an object, or site-relative x/y - the same coordinate space building.place_object uses - to look at a spot; with neither, it centres on the site. It also switches the floor view to the target's floor, so an object on another storey actually becomes visible. Note that camera.observe_location and profiler.camera_jump cannot be used here: they switch to the free camera, which makes the game LEAVE build mode and then refuses build.enter_mode until the camera mode is restored (camera.follow_entity). This is a VIEW change only: nothing is added to the build undo history. Requires phase == 'ready' (see build.get_mode_state).
Metadata
| Field | Value |
|---|---|
| Display | Focus Build Camera |
| Category | build |
| Access | ScriptCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| entity_id | entityId | no | — | Object to centre on. Overrides x/y. |
| x | float | no | — | Site-relative X in cm to centre on (ignored when entity_id is given). |
| y | float | no | — | Site-relative Y in cm to centre on (ignored when entity_id is given). |
| zoom | float | no | — | Camera distance in cm. Omit to keep the build camera's default zoom, which is the point of this command. |
| pitch | float | no | — | How steeply to look down, 1-89 degrees. 60 is the normal build view, 89 a straight top-down plan view. Omit both pitch and yaw to keep the current angle. |
| yaw | float | no | — | WORLD yaw in degrees the camera faces. Defaults to the site's own yaw when only pitch is given; giving only yaw sets pitch to 60. Ignored while the build camera is in free view. |
Returns
- Freeform result (shape is not fixed).
{ target: 'entity'|'site_relative_xy'|'site_center', entity_id: int, site_location: {x,y,z}, world_location: {x,y,z}, requested_zoom: float }
Usage
await inzoi.cli.execute('build.focus_camera', {
entity_id: 0, // optional
x: 0.0, // optional
y: 0.0, // optional
zoom: 0.0, // optional
pitch: 0.0, // optional
yaw: 0.0, // optional
});