# Enable Controller Movement + Teleportation

### Add a locomotion system

* In the Hierarchy select **the XR Origin Game Object***.*
* Click on the **Add Component** button. Search and select the **Locomotion System**
* Drag the **XR Origin Game Object** in the *Hierarchy* into the *XR Origin parameter* drop-down box.&#x20;

  <figure><img src="/files/OVnWoqFQbKjkPUZ8MTiL" alt="" width="563"><figcaption></figcaption></figure>

### Set your left controller joystick to move foward, backward, and strafe left and right

* In the Hierarchy select **the XR Origin Game Object***.*
* Click on the **Add Component** button. Search and select the **Continuous Move Provider**

#### Within the Continuous Move Provider componen&#x74;**:**

* Drag the **XR Origin Game Object** in the *Hierarchy* into the S*ystem* drop-down box.&#x20;
* Check-on **Enable Strafe**
* Under the *Left-Hand Move Action,* Check-on **Use Reference**

  * The *Reference* parameter should auto populate with the **XRI LeftHand Locomotion/Move** script
  * If it doesn't, click on the bullseye to the right of the drop down and select the **XRI LeftHand Locomotion/Move** script

  <figure><img src="/files/2esIZnJRd42TS0hxMqg7" alt="" width="375"><figcaption></figcaption></figure>

### Set your right controller joystick to turn clockwise and counter-clockwise

* In the Hierarchy select **the XR Origin Game Object***.*
* Click on the **Add Component** button. Search and select the **Continuous Turn Provider**
*

```
#### Within the Continuous Turn Provider componen&#x74;**:**
```

```
* Drag the **XR Origin Game Object** in the _Hierarchy_ into the &#x53;_&#x79;stem_ drop-down box.&#x20;
* Set _Turn Speed_ to **60.**&#x20;
  * Lower the number if you tend to get dizzy or nauseous
*
*   Under the _Right Hand Turn Action,_ Check-on **Use Reference**

    * The _Reference_ parameter should auto populate with the **XRI RightHand Locomotion/Turn** script
    * If it doesn't, click on the bullseye to the right of the drop down and select the **XRI RightHand Locomotion/Turn** script

    <figure><img src="/files/5trPfW7LJz8R4Hyk0xm2" alt="" width="375"><figcaption></figcaption></figure>
```

## Teleportation

This will allow you to teleport instantaneously onto surfaces marked for teleportation

### Set up your XR Origin to Teleport

* In the Hierarchy select **the XR Origin Game Object***.*
* Click on the **Add Component** button. Search and select the **Teleportation Provider**
* Drag the **XR Origin Game Object** in the *Hierarchy* into the *System* drop-down box.
* <mark style="color:red;">Remember, you can only teleport on surfaces that have been marked for teleportation</mark>&#x20;

<figure><img src="/files/dnDUmr26SzeWwtNvyQ9a" alt="" width="563"><figcaption></figcaption></figure>

### Mark game objects/surfaces for teleportation

**Select** the game object you want to enable teleportation on. This may be a floor, or different platforms in your VR project.

Click on the **Add Component** button. Add a **Collider** to your object. Often a plane or box collider are best.&#x20;

Click on the **Add Component** button. Search and select the **Teleportation Anchor** or **Teleportation Area**, whichever you prefer.

* **Teleportation Area:** Teleport to any point on the surface of the object&#x20;
*
* **Teleportation Anchor:** Teleport to the middle/center of the object

Under the parameter, *Interaction Layer Mask*, click the drop-down that says *default* and select **Nothing**

<figure><img src="/files/82ZntlTx0gcQEfiwkZwS" alt="" width="375"><figcaption></figcaption></figure>

Click on the drop-down again and select **Teleport**

<figure><img src="/files/3lGhmVpQQiQE2sT6NhDj" alt="" width="375"><figcaption></figcaption></figure>

1. If the option for *Teleport* doesn't exist, select **Add Layer**
2. Write **Teleport** on any free space
3. Navigate back to the object in the *Hierarchy* and sent the *Interaction Layer Mask* to **Teleport**
4. <mark style="background-color:yellow;">Setting up and Using the</mark> <mark style="background-color:yellow;"></mark>*<mark style="background-color:yellow;">Teleport Interaction Layer Mask</mark>* <mark style="background-color:yellow;"></mark><mark style="background-color:yellow;">Isn't technically necessary, but it is a best practice that will allow for more control over your project.</mark>&#x20;

<figure><img src="/files/apTVBtE0InKlNMUYHCnF" alt="" width="375"><figcaption><p>A reference of default settings for the Telelportation Area when enabled correctly. </p></figcaption></figure>


---

# 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://gitbook.brown.edu/bai-creative-technology/guides/virtual-reality/virtual-reality-with-unity-getting-started/enable-controller-movement-+-teleportation.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.
