Teleportation

Updated on

November 27, 2024

Moving inside a VR application gives an immersive experience, and moving by walking around in reality will allow for even more immersiveness. But sometimes the space the user has available will not allow it, which is a common occurrence. In this case, we will need to find other ways to move around in VR, especially to overcome long distances. 

Summary of this VR Builder Tutorial

In this VR Builder tutorial, you will learn how to move inside VR using VR Builder and Unity. In this tutorial you will learn about

  1. Free teleportation
  2. Anchored teleportation
  3. Continuous and non-continuous movement

Free teleportation

Free teleportation is the “default” or most common way of moving around in VR, this type of teleportation allows you to jump around the experience in a predefined area. This could be a whole space, or something like a road.

For this demonstration we have created a new empty project and imported VR Builder, if you have any doubts about this, I recommend following the setup tutorial before continuing with this one.

We will start by creating a plane. Add a plane game object, adjust it to a size in which the user will be able to move around, make sure there’s a collider in the plane either this be a mesh collider or a box collider and set the layer to Teleport. Another object that we must add is a Teleportation Area (VR Builder) component. 

In this component we have to make sure that the Teleport layer is assigned to the Interaction Layer Mask property.

You can automatically configure it by pressing the Configure VR Builder Defaults button at the bottom.

And now the user will be able to  move inside your application. 

If this is not working out of the box, some misconfiguration might be the cause. But don’t worry, it’s an easy fix.

You can reconfigure all teleportation interactors/interactables in the scene by selecting Tools > VR Builder > Developer > Configure Teleportation layers. This will automatically set all raycast layers/interaction layers to the Teleport layer.

Anchored teleportation

For some VR experiences, it is meant for the user to be in specific places of the environment, maybe a training table, where they are supposed to perform some action before moving to the next spot. In these cases anchored teleportation serves as a guide to the user as it highlights the place where the user is supposed to go and restricts teleportation, so they can only move to that desired spot.. 

Now, let’s guide the user by using Anchored teleportation.

To set it up, create an empty game object, rename it to Teleport point A and position it where you want your target position to be. 

Inside the Process Editor, create a new step and connect it.

In the step inspector create a transition condition Locomotion > Teleport.

Drag the Teleport point A game object to reference it as the Teleportation point. Click on fix it.

Go back to the Teleport point A game object, as you can see some properties have been added to the game object. In Teleportation Anchor (VR Builder), we have a new option enabled “Set Default Teleportation Anchor”, click on it. This will create a nice visual effect.

Now the teleportation point is up and running.

To improve the experience, you can also click the other buttons in the Teleportation Anchor component. "Add Snap Volume" will make the teleportation ray snap to the anchor. "Add Interaction Affordance" will give the user feedback when teleportation is available. "Add Proximity Entry" will make the teleportation anchor consider the user as teleported there even if the user walked there or approached the anchor with continuous movement. This can be useful in VR Builder processes where you have a Teleport condition, but the important part is that the user is in the area, not that they actually teleport there.

One really cool thing about teleportation anchors is that they will only be enabled, by enabled I mean visible and functioning, during the steps when the user is intended to go to these places. if we were to add a Teleport point B or a teleport Point C in a succession of steps. Teleport Point A would be visible at first, when completed Teleport point B would become visible while Teleport Point A invisible, and so on.

Troubleshooting

Sometimes, you can’t see any visual effect when pointing to move to the Anchor point. If you would like to fix this or set your own visual effect, select the anchor you would like to modify, and in the inspector look for the Teleportation Area Component.

In Custom reticle, I will set the default reticle which is “Teleport reticle” But here you can set your own custom effect.

Continuous or non-continuous

There are different types of locomotion in VR. It can be continuous or non-continuous.

So far we have been experimenting with non-continuous movement which is teleporting, now we will show you continuous movement.

This is constant and uninterrupted movement, as anyone would move in any other game. This type of movement is not so common in VR experiences as it may, and most probably will, cause motion sickness especially in people not used to VR or advanced in age. So we generally advise caution when using it.

You can enable and disable different locomotion types by expanding the rig in the scene and enabling/disabling the children of the Locomotion game object. "Move" and "Turn" enable continuous movement. Note there are also other locomotion types. "Climb" lets you go up climbable object. Currently there is no direct support for climbing in VR Builder processes, but nothing stops you from having climbable objects in the scene. "Grab move" lets you move around by "grabbing" the world with the controllers and dragging yourself around. Since it's a situational locomotion system, it's disabled by default.

Next steps

This would be it for this video, in this VR Builder tutorial you have learned how to add movement to your VR Builder application, and how to customise it. Now how about you start experimenting with snapzones?

If you have any questions, join the VR Builder community on discord to  get in touch with VR Builder users and developers. 

Ready to get Started?

Download Vr Builder