Skip to main content

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

FieldValue
DisplayMove Object
Categorybuilding
AccessScriptCheat
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
entity_identityIdyes—Target game object entity ID (from build.scan_objects)
loc_xfloatno—Target X in cm from the site min corner, same space as build.scan_objects (default: current)
loc_yfloatno—Target Y in cm from the site min corner, same space as build.scan_objects (default: current)
loc_zfloatno—Target Z in cm above the site origin plane (default: current)
pitchfloatno—Target SITE-RELATIVE pitch in degrees (default: current)
yawfloatno—Target SITE-RELATIVE yaw in degrees; 0 is parallel to the site axes, which is what lines up with axis-aligned walls (default: current)
rollfloatno—Target SITE-RELATIVE roll in degrees (default: current)
scalefloatno—Uniform scale applied to all axes (default: current)
scale_xfloatno—Per-axis X scale; overrides 'scale'
scale_yfloatno—Per-axis Y scale; overrides 'scale'
scale_zfloatno—Per-axis Z scale; overrides 'scale'
floor_levelintno—Absolute target floor level (default: current floor)
clean_floorboolnotrueClean 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
});