Movement - Teleportation
Last updated
Last updated
The Meta SDK comes with some tools that enable movement within the experience.
The most important is the 'OVRCameraRigInteraction' as this includes movement functionality.
One approach to adding movement, when using the 'OVRCameraRigInteraction' prefab as a base, is by using teleportation using Teleport Hotspots or Open Teleportation.
Teleport Hotspots allow you to specify exactly where the user can teleport to, whereas Open Teleportation allows the user to teleport wherever they want on an asset like a floor.
Search for the 'TeleportHotspot' or 'TeleportHotspotWithViewport' prefab in the Project window.
Make sure to set the Search to 'All' if you cannot see them.
'TeleportHotspot' will keep the user in the same direction they are facing when they teleport.
'TeleportHotspotWithViewport' offers a teleport location that has a specific facing direction.
Drag the Prefab into your Hierarchy or scene to place it.
You do not need to have a floor asset if you are just using the hotspots for movement.
If you are also using a floor asset, make sure the hotspots are raised a little above the floor otherwise they will not be able to be teleported to.
If you haven't added one already, add a floor asset such as a 'Plane' or 'Quad'.
Note the asset should have a collider such as a Mesh or Box Collider.
If you are using Passthrough you can Disable or Remove the Mesh Renderer.
Select the asset you would like to be able to teleport onto such as the floor.
Add a 'Teleport Interactable' component to the asset.
Add a 'Collider Surface' component to the asset.
Drag the asset collider (mesh, box etc.) onto the 'Collider Surface' Collider property.
Drag the 'Collider Surface' component onto the 'Teleport Interactable' Surface property.
Add a 'Reticle Data Teleport' Component onto the floor asset.
Set the 'Reticle Mode' to 'Valid Target'.
Drag the 'Reticle Data Teleport' component onto the 'Teleport Interactable' Component under 'Interactor Filters / Data' property which is under the 'Optionals' pulldown.