> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-comfy-docs-comfyapi-search.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# RotateMesh - ComfyUI Built-in Node Documentation

> Rotate a 3D mesh around the world axes using either Euler XYZ angles (in degrees) or a quaternion.

Rotate a 3D mesh around the world axes using either Euler XYZ angles (in degrees) or a quaternion. In Euler XYZ mode the rotations are applied as X then Y then Z; in quaternion mode the (w, x, y, z) quaternion is automatically normalized. The rotation is applied to the mesh's vertices, and the normals and tangents are rotated as well so lighting and shading remain correct.

## Inputs

### Common Inputs

| Parameter | Description                                                                                                                                                                                           | Data Type      | Required | Range                             |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------- | --------------------------------- |
| `mode`    | The rotation mode to use. `"euler_xyz"` applies rotation as X then Y then Z angles about the world axes (in degrees). `"quaternion"` uses a (w, x, y, z) quaternion that is automatically normalized. | DYNAMIC\_COMBO | Yes      | `"euler_xyz"`<br />`"quaternion"` |
| `mesh`    | The 3D mesh to rotate.                                                                                                                                                                                | MESH           | Yes      | —                                 |

### euler\_xyz Inputs

These inputs appear when `mode` is set to `"euler_xyz"`.

| Parameter | Description                                           | Data Type | Required | Range                       |
| --------- | ----------------------------------------------------- | --------- | -------- | --------------------------- |
| `angle_x` | Rotation around the X axis in degrees. (default: 0.0) | FLOAT     | No       | -360.0 to 360.0 (step: 0.1) |
| `angle_y` | Rotation around the Y axis in degrees. (default: 0.0) | FLOAT     | No       | -360.0 to 360.0 (step: 0.1) |
| `angle_z` | Rotation around the Z axis in degrees. (default: 0.0) | FLOAT     | No       | -360.0 to 360.0 (step: 0.1) |

### quaternion Inputs

These inputs appear when `mode` is set to `"quaternion"`.

| Parameter | Description                                                | Data Type | Required | Range                     |
| --------- | ---------------------------------------------------------- | --------- | -------- | ------------------------- |
| `qw`      | W component of the quaternion (w, x, y, z). (default: 1.0) | FLOAT     | No       | -1.0 to 1.0 (step: 0.001) |
| `qx`      | X component of the quaternion (w, x, y, z). (default: 0.0) | FLOAT     | No       | -1.0 to 1.0 (step: 0.001) |
| `qy`      | Y component of the quaternion (w, x, y, z). (default: 0.0) | FLOAT     | No       | -1.0 to 1.0 (step: 0.001) |
| `qz`      | Z component of the quaternion (w, x, y, z). (default: 0.0) | FLOAT     | No       | -1.0 to 1.0 (step: 0.001) |

**Note:** When `mode` is `"euler_xyz"` and all three angles are 0.0, or when `mode` is `"quaternion"` and the quaternion is the identity (1, 0, 0, 0), the mesh is returned unchanged. The quaternion is automatically normalized before use; if its magnitude is below 1e-8, the node raises an error.

## Outputs

| Output Name | Description                                                                                                                                                                         | Data Type |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `mesh`      | The rotated mesh. Vertices are rotated, and normals are rotated as directions. Tangents have their X, Y, Z components rotated while the W (handedness) component is kept unchanged. | MESH      |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/RotateMesh/en.md)

***

**Source fingerprint (SHA-256):** `38b120a3f719264d1269275ecfefa145b507c688735e4a461bb89517c697674f`
