setRotation
setRotation
Sets the rotation of an object.
Signature
setRotation(objectName: string, rotation: Euler): Promise<void>Parameters
Name
Type
Required
Description
objectName
string
Yes
Object name
Returns
Promise<void>
Usage
// Rotate 45 degrees around Y axis
await api.setRotation("Chair", { x: 0, y: 45, z: 0 });
// With explicit rotation order
await api.setRotation("Chair", { x: 90, y: 0, z: 0, order: "XYZ" });Notes
Values are in degrees, not radians
Sets local rotation (relative to parent)
Important: Always provide all three coordinates (x, y, z). Missing values become
null, not preservedThe
orderfield is optional (defaults to "XYZ")Only accepts string name, not array
Last updated