> For the complete documentation index, see [llms.txt](https://learnpython.strivemath.com/p5-python-web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learnpython.strivemath.com/p5-python-web/reference/3d-controls/orbitcontrol.md).

# orbitControl()

### Example

<div><figure><img src="/files/GJUleuRrayNreEKmY41K" alt=""><figcaption></figcaption></figure> <figure><img src="/files/Ag3FCHhUEtWafxuG1FPA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/EfFLxNVQ1tKnGNeHblFH" alt=""><figcaption></figcaption></figure></div>

### Syntax

```
orbitControl([sensitivityX], [sensitivityY], [sensitivityZ])
```

<table><thead><tr><th width="136">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>sensitivityX</td><td>sensitivity to mouse movement along the x-axis</td></tr><tr><td>sensitivityY</td><td>sensitivity to mouse movement along the y-axis</td></tr><tr><td>sensitivityZ</td><td>sensitivity to mouse movement along the z-axis</td></tr></tbody></table>

### Description

Allows movement around a 3D sketch **using a mouse or trackpad**.

* **Left-clicking** and dragging will **rotate** the camera position **about the center of the canvas** (not necessarily `0, 0, 0`, as you might have moved your camera before)
* **Right-clicking** and dragging will **shift** the camera position without rotation
* **Rolling the mouse wheel or the trackpad** (scrolling) will move the camera **closer or further from the center of the canvas.**

This function can be called with parameters dictating sensitivity to mouse movement along the X and Y axes. Calling this function without parameters is equivalent to calling `orbitControl(1,1)`. **To reverse direction of movement** in either axis, enter a negative number for sensitivity.

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
