# Rotation

## Introduction

`Rotation` can be used to rotate Gum components. Rotation is measured in degrees, where positive values rotate an object counterclockwise about its origin ([X Origin](/gum/gum-tool/gum-elements/general-properties/x-origin.md) and [Y Origin](/gum/gum-tool/gum-elements/general-properties/y-origin.md)).

## Example

An object is rotated about its origin, which by default is its top-left corner:

![Rotating an object using the Rotation variable](/files/oBjRFzW7yDzC6dtwZZMq)

Objects can also be rotated visually by grabbing the rotation handle:

![Rotation handles can rotate an object](/files/qkU0IjWe5EpI2npRosgm)

Holding the SHIFT key snaps angles to 15 degree increments.

<figure><img src="/files/n3EwojSQGLCU5oFEMoOl" alt=""><figcaption><p>SHIFT rotate snaps to 15 degree increments</p></figcaption></figure>

## X Origin and Y Origin

The [X Origin](/gum/gum-tool/gum-elements/general-properties/x-origin.md) and [Y Origin](/gum/gum-tool/gum-elements/general-properties/y-origin.md) properties define the point of rotation for an object. The following animation shows how changing origin values can affect rotation.

![Objects rotate about their origin.](/files/zLceJ9jpz3CrGC2lYuSj)


---

# 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.flatredball.com/gum/gum-tool/gum-elements/general-properties/rotation.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.
