> For the complete documentation index, see [llms.txt](https://www.xrdev.app/mixed-reality-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.xrdev.app/mixed-reality-docs/lessons/lesson-3/project/how-to-rotate-and-scale-an-object.md).

# How to rotate and scale an object?

To rotate and scale an object, first ensure that the **Manipulation Handler (Script)** and **Near Interaction Grabbable (Script)** components are added to the object. The **Manipulation Handler (Script)** allows you to manipulate an object while the **Near Interaction Grabble (Script)** allows the object to respond to near hand interactions.

To add the scripts to the object, first select the object in the Hierarchy window. In the Inspector window, click **Add Component** and search for each script. Once found, select the script to add to the object.

![Manipulation Handler Script](/files/-M7-yoqb7VK6XYyusQ_g)

With the object selected, in the Inspector window, navigate to the **Manipulation Handler (Script)** component to modify the component's parameters.

![Manipulation Handler parameters](/files/-M7-z2aGi_JHLW29WFC3)

You can rotate an object using one or two hands. This setting is dependent on the **Manipulation Type** parameter. The **Manipulation Type** can be limited to either:

* One Handed Only
* Two Handed Only
* One and Two Handed

Select **Two Handed Only** for **Manipulation Type** so that the user can only manipulate the object with two hands.

![Manipulation Type](/files/-M7-zAwytKSqOEo_Mspy)

To limit the two handed manipulation to rotating and scaling, change **Two Handed Manipulation Type** to **Rotate Scale**.

![Rotate and Scale](/files/-M70-6LMK0E06uxLPloB)

To limit whether the object can be rotated on the x, y or z axis, change **Constraint on Rotation** to your preferred axis.

![Rotation Constrain](/files/-M70-DmFwekrb1-mHSjq)

You can now test rotating and scaling the object using the in-editor simulation. Press the **Play** button to enter Game mode. Once in Game mode, press **T** and **Y** on the keyboard to toggle both hands. This will permanently display both hands in Game mode. Press the space bar to move the right hand and use left mouse click + **Shift** to move the left hand. While either controlling the left or right hand, use the mouse to rotate and scale the object.

![Rotate interaction](/files/-LzJuE8IG34FCaFiTKZv)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://www.xrdev.app/mixed-reality-docs/lessons/lesson-3/project/how-to-rotate-and-scale-an-object.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.
