Guides
These docs are for v2.1.0. Click to read the latest docs for v3.3.0.

VRTK_RoomExtender

Overview

This script allows the playArea to move with the user. The [CameraRig] is only moved when at the edge of a defined circle. Aims to create a virtually bigger play area. To use this add this script to the [CameraRig] prefab.

There is an additional script VRTK_RoomExtender_PlayAreaGizmo which can be attachted to the [CameraRig] to visualize the extended playArea within the Editor.

Inspector Parameters

  • Movement Function: This determines the type of movement used by the extender and can be one of the following options:
  • Nonlinear: Moves the head with a non linear drift movement.
  • LinearDirect: Moves the headset in a direct linear movement.
  • Additional Movement Enabled: This is the a public variable to enable the additional movement. This can be used in other scripts to toggle the [CameraRig] movement.
  • Additional Movement Enabled On Button Press: This configures the controls of the RoomExtender. If this is true then the touchpad needs to be pressed to enable it. If this is false then it is disabled by pressing the touchpad.
  • Additional Movement Multiplier: This is the factor by which movement at the edge of the circle is amplified. 0 is no movement of the [CameraRig]. Higher values simulate a bigger play area but may be too uncomfortable.
  • Head Zone Radius: This is the size of the circle in which the playArea is not moved and everything is normal. If it is to low it becomes uncomfortable when crouching.
  • Debug Transform: This transform visualises the circle around the user where the [CameraRig] is not moved. In the demo scene this is a cylinder at floor level. Remember to turn of collisions.

Example

SteamVR_Unity_Toolkit/Examples/028_CameraRig_RoomExtender shows how the RoomExtender script is controlled by a VRTK_RoomExtender_Controller Example script located at both controllers. Pressing the Touchpad on the controller activates the Room Extender. The Additional Movement Multiplier is changed based on the touch distance to the center of the touchpad.