-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Teleport
[VRTK_BasicTeleport]
The basic teleporter updates the [CameraRig] x/z position in the
game world to the position of a World Pointer's tip location which is
set via the WorldPointerDestinationSet event. The y position is never
altered so the basic teleporter cannot be used to move up and down
game objects as it only allows for travel across a flat plane.
The Basic Teleport script is attached to the [CameraRig] prefab and
requires an implementation of the WorldPointer script to be attached
to another game object (e.g. VRTK_SimplePointer attached to
the Controller object).
The following script parameters are available:
-
Blink Transition Speed: The fade blink speed can be changed on
the basic teleport script to provide a customised teleport experience.
Setting the speed to 0 will mean no fade blink effect is present.
The fade is achieved via the
SteamVR_Fade.csscript in the SteamVR Unity Plugin scripts. - Distance Blink Delay: A range between 0 and 32 that determines how long the blink transition will stay blacked out depending on the distance being teleported. A value of 0 will not delay the teleport blink effect over any distance, a value of 32 will delay the teleport blink fade in even when the distance teleported is very close to the original position. This can be used to simulate time taking longer to pass the further a user teleports. A value of 16 provides a decent basis to simulate this to the user.
- Headset Position Compensation: If this is checked then the teleported location will be the position of the headset within the play area. If it is unchecked then the teleported location will always be the centre of the play area even if the headset position is not in the centre of the play area.
- Ignore Target With Tag Or Class: A string that specifies an object Tag or the name of a Script attached to an obejct and notifies the teleporter that the destination is to be ignored so the user cannot teleport to that location. It also ensure the pointer colour is set to the miss colour.
An example of the VRTK_BasicTeleport script can be viewed in the
scene SteamVR_Unity_Toolkit/Examples/004_CameraRig_BasicTeleport.
The scene uses the VRTK_SimplePointer script on the Controllers to
initiate a laser pointer with the Controller Grip button and when
the laser pointer is deactivated (release the Grip) then the player
is teleported to the location of the laser pointer tip.
- Home
- Quick Start
- FAQ/Troubleshooting
- Prefabs
-
Scripts
- Controllers
- Pointers
- Movement
- Interactions
- Examples