setPosition

setPosition

Sets the position of an object.

Signature

setPosition(objectName: string, position: Vector3): Promise<void>

Parameters

Name
Type
Required
Description

objectName

string

Yes

Object name

position

Yes

New position {x, y, z}

Returns

Promise<void>

Usage

// Set absolute position
await api.setPosition("Chair", { x: 100, y: 50, z: 0 });

// Move relative to current position
const current = await api.getPosition("Chair");
await api.setPosition("Chair", { 
  x: current.x + 10, 
  y: current.y, 
  z: current.z 
});

Notes

  • Coordinates use Z-up orientation

  • Sets local position (relative to parent)

  • Important: Always provide all three coordinates (x, y, z). Missing values default to 0, not current position

  • Only accepts string name, not array

Last updated