getPosition
Last updated
Returns the position of an object.
getPosition(objectName: string): Promise<Vector3>objectName
string
Yes
Object name
Promise<Vector3> - Object position as {x, y, z}.
See Vector3 in Common Types.
const position = await api.getPosition("Chair");
console.log(position); // { x: 0, y: 100, z: 50 }Returns local coordinates (relative to parent), not world coordinates
Coordinates use Z-up orientation
Same value as getObjects()[0].position
Only accepts string, not array
Last updated