Enable Controller Movement + Teleportation

Moving around, picking up objects and triggering events requires adding VR interaction components in Unity

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.

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 component:

  • Drag the XR Origin Game Object in the Hierarchy into the System drop-down box.

  • 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

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 component:

    • Drag the XR Origin Game Object in the Hierarchy into the System drop-down box.

    • Set Turn Speed to 60.

      • 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

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.

  • Remember, you can only teleport on surfaces that have been marked for teleportation

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.

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

  • 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

Click on the drop-down again and select Teleport

  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. Setting up and Using the Teleport Interaction Layer Mask Isn't technically necessary, but it is a best practice that will allow for more control over your project.

A reference of default settings for the Telelportation Area when enabled correctly.

Last updated