building.move_object
Overview
- [Build Mode Only] Moves, rotates, rescales and/or re-floors a single placed object through the build undo/redo stack (revert with building.undo). loc_x/y/z AND pitch/yaw/roll are all SITE-RELATIVE - the same space as build.scan_walls, build.scan_floors and building.place_object - because the site itself is rotated against the world axes. Scale is uniform world scale. Any omitted component keeps the object's current value. This handles ONE object per call - moving N objects needs N calls and N undo steps (unlike building.put_in_inventory, which batches into a single step). Unlike building.set_object_transform, this goes through the command stack and IS undoable. Requires phase == 'ready' (see build.get_mode_state).
Metadata
| Field | Value |
|---|---|
| Display | Move Object |
| Category | building |
| Access | ScriptCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| entity_id | entityId | yes | — | Target game object entity ID (from build.scan_objects) |
| loc_x | float | no | — | Target X in cm from the site min corner, same space as build.scan_objects (default: current) |
| loc_y | float | no | — | Target Y in cm from the site min corner, same space as build.scan_objects (default: current) |
| loc_z | float | no | — | Target Z in cm above the site origin plane (default: current) |
| pitch | float | no | — | Target SITE-RELATIVE pitch in degrees (default: current) |
| yaw | float | no | — | Target SITE-RELATIVE yaw in degrees; 0 is parallel to the site axes, which is what lines up with axis-aligned walls (default: current) |
| roll | float | no | — | Target SITE-RELATIVE roll in degrees (default: current) |
| scale | float | no | — | Uniform scale applied to all axes (default: current) |
| scale_x | float | no | — | Per-axis X scale; overrides 'scale' |
| scale_y | float | no | — | Per-axis Y scale; overrides 'scale' |
| scale_z | float | no | — | Per-axis Z scale; overrides 'scale' |
| floor_level | int | no | — | Absolute target floor level (default: current floor) |
| clean_floor | bool | no | true | Clean up the floor slab the object leaves behind |
Usage
await inzoi.cli.execute('building.move_object', {
entity_id: 0,
loc_x: 0.0, // optional
loc_y: 0.0, // optional
loc_z: 0.0, // optional
pitch: 0.0, // optional
yaw: 0.0, // optional
roll: 0.0, // optional
scale: 0.0, // optional
scale_x: 0.0, // optional
scale_y: 0.0, // optional
scale_z: 0.0, // optional
floor_level: 0, // optional
clean_floor: true, // optional
});