# Rotator

Rotator allows an object to spin on any axis, to any degree, and at any speed. These can all be tested at any time during create mode by pressing the play button on the top right of the object's component menu ▶️

![](/files/XkLR7MFHEtRO4xPZlqwQ)

* **Pivot position** - dictates around what central point the object will rotate on the xyz axis
  * Think of the pivot position as the object's centre of gravity.
  * By default, each value is set to 0, meaning the object will only spin in place. This is useful for traps like spinning blades or fans.

![Changing the pivot point](/files/mJZcKHOuaTbx8rLkjcDa)

* **Rotation axis** - dictates the direction(s) in which an object will rotate<br>
* **Rotation (degrees)** - dictates how far the object rotates.
  * Can be anywhere from -360 to 360 degrees.
    * Figures below 0 will rotate the object one way, while figures above 0 will rotate the object the other way.<br>
* **Speed** - dictates how fast the object rotates.<br>
* **Auto-start** - dictates whether or not the object begins rotating from the start of the game.<br>
* **Yo-yo** - dictates whether or not the object rotates back and forth once reaching its final degree of rotation<br>
* **Loop** - dictates whether or not the object will rotate constantly on a loop
  * This is best for objects you want to keep spinning until told otherwise. Even if an object's rotation is set to 360 degrees, it will stop rotating after one turn. Select "Yes" to loop to keep it going.

!["Everything the light touches... has a Rotator on it, Simba."](/files/L3FIk7nY8amg2DfqylH2)

### Common uses

* Spinning blades and other traps
* Fans
* Vehicles
* Doors and drawbridges - swinging on hinges
* Collectibles and hearts - make them stand out!

![](/files/iwrDm3k66vZzWMMY5jAu) ![](/files/yhpO62Ullt1oS66zyAHc)


---

# 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://docs.mutate.games/component-tutorials/components-a-closer-look/entity-components/rotator.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.
