# getRotation

### getRotation

Returns the rotation of an object.

#### Signature

```typescript
getRotation(objectName: string): Promise<Euler>
```

#### Parameters

<table><thead><tr><th>Name</th><th>Type</th><th width="172.76953125">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>objectName</code></td><td><code>string</code></td><td>Yes</td><td>Object name</td></tr></tbody></table>

#### Returns

`Promise<Euler>` — Object rotation as `{x, y, z, order}`.

* `x`, `y`, `z` — rotation angles in **degrees**
* `order` — rotation order (e.g., `"XYZ"`)

See [Euler](/api/model-api/api-reference.md#euler) in Common Types.\ <br>

#### Usage

```javascript
const rotation = await api.getRotation("Chair");
console.log(rotation); // { x: 0, y: 45, z: 0, order: "XYZ" }
```

#### Notes

* Values are in **degrees**, not radians
* Returns **local** rotation (relative to parent)
* Same value as `getObjects()[0].rotation`
* Only accepts string, not array

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.vectary.com/api/model-api/api-reference/getrotation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
