Setting up teleporting
The VIVEPORT Scene SDK includes a standardized teleport prefab that uses Unity NavMesh data. Add teleporting to make it as easy as possible for potential customers to explore your preview. Even if your title wouldn’t normally supply teleporting, you can add it to your VR preview for a seamless experience within the VIVEPORT VR store.
- Add a gameobject – such as a flat plane, terrain, or other surface – to add a navigation method.
- Select the gameobject. In the Inspector tab, name it TeleportObject .
- In the Navigation window under Object , make sure that Navigation Static is selected. If you don’t see the Navigation window, click Window > Navigation .
- Still in the Navigation window under Object , set Navigation Area to Walkable .
- In the Navigation window under Bake , click the Bake This will apply a navmesh to your object.
- From the hierarchy, choose the [VIVEPORT Scene SDK] you added before, expand it using the small arrow, and choose Navmesh .
- From the Inspector window, find Vive Nav Mesh (Script) , and then click Update Navmesh Data .
Tip
: You should test your scene in VR after configuring navigation.
Disabling movement for certain areas and objects
Sometimes you may want to prevent users from moving through an area or object – perhaps there is an object you don’t want them to stand on or an area outside your content that would otherwise be accessible. Setting these areas as non-walkable will also prevent teleporting.
To disable movement for certain gameobjects:
- Select the gameobject you want to disable movement on.
- In the Navigation tab under Object , make sure that Navigation Static is selected. If you don’t see the Navigation window, click Window > Navigation .
- Still in the Navigation window under Object , set Navigation Area to Not Walkable.
- In the Navigation window under Bake , click the Bake button. This will apply a navmesh to your object.
Your object will now have movement disabled.