VRTK_RoomExtender
Overview
This script allows the playArea to move with the user. The play area is only moved when at the edge of a defined circle.
There is an additional script VRTK_RoomExtender_PlayAreaGizmo
which can be attached alongside to visualize the extended playArea within the Editor.
Inspector Parameters
- Movement Function: This determines the type of movement used by the extender.
- Additional Movement Enabled: This is the a public variable to enable the additional movement. This can be used in other scripts to toggle the play area 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 play area. 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 play area is not moved. In the demo scene this is a cylinder at floor level. Remember to turn of collisions.
Class Variables
public enum MovementFunction
- Movement methods.Nonlinear
- Moves the head with a non-linear drift movement.LinearDirect
- Moves the headset in a direct linear movement.
Example
VRTK/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 centre of the touchpad.
Updated less than a minute ago