Guides

VRTK_HeightAdjustTeleport

extends VRTK_BasicTeleport

Overview

Updates the x/y/z position of the SDK Camera Rig with an optional screen fade.

The Camera Rig can be automatically teleported to the nearest floor y position when utilising this teleporter.

Script Usage:

  • Place the VRTK_HeightAdjustTeleport script on any active scene GameObject.

Script Dependencies:

  • An optional Destination Marker (such as a Pointer) to set the destination of the teleport location.

Inspector Parameters

  • Snap To Nearest Floor: If this is checked, then the teleported Y position will snap to the nearest available below floor. If it is unchecked, then the teleported Y position will be where ever the destination Y position is.
  • Apply Playarea Parent Offset: If this is checked then the teleported Y position will also be offset by the play area parent Transform Y position (if the play area has a parent).
  • Custom Raycast: A custom raycaster to use when raycasting to find floors.

Example

VRTK/Examples/007_CameraRig_HeightAdjustTeleport has a collection of varying height objects that the user can either walk up and down or use the laser pointer to climb on top of them.

VRTK/Examples/010_CameraRig_TerrainTeleporting shows how the teleportation of a user can also traverse terrain colliders.

VRTK/Examples/020_CameraRig_MeshTeleporting shows how the teleportation of a user can also traverse mesh colliders.