> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rollingquest.kramgames.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Level Rotation

> How to rotate the entire level layout in the RollingQuest editor using 90-degree increments on any axis.

The Level Rotation tool lets you rotate the entire level layout by 90-degree increments on any axis. This is useful for changing the orientation of your level without manually repositioning every block.

## Opening the Rotation Menu

Press **R** to open the Level Rotation Menu.

## Rotation Options

The menu provides six rotation buttons:

| Button | Rotation                              |
| ------ | ------------------------------------- |
| **X+** | Rotate 90° around the positive X axis |
| **X-** | Rotate 90° around the negative X axis |
| **Y+** | Rotate 90° around the positive Y axis |
| **Y-** | Rotate 90° around the negative Y axis |
| **Z+** | Rotate 90° around the positive Z axis |
| **Z-** | Rotate 90° around the negative Z axis |

## How Rotation Works

When you select a rotation:

1. The current level data is built from all sections (`BuildDataFromLevel`)
2. A rotated copy is created (`CreateRotatedCopy`)
3. The editor is reloaded with the rotated data
4. All block positions, item placements, enemy orientations, and ball directions are transformed

The rotation affects:

* Block positions in the 3D grid
* Item and decoration orientations
* Ball and enemy directions
* Camera position (reset to default after rotation)

<Warning>
  Level rotation is irreversible within the editor — there is no undo. Make sure to save before rotating if you want to preserve the original orientation.
</Warning>

## After Rotation

After the rotation completes:

* The editor reloads all sections
* The skybox is rebuilt
* Illumination is recomputed
* The camera resets to its default position
* All unsaved changes are preserved (the rotation itself triggers an unsaved changes flag)
