Skip to content

Commit 1ac9bcc

Browse files
committed
feat(Locomotion): add step multiplier locomotion method
The Step Multiplier is a modified version of the Room Extender where it has the button mappings on the script itself and is placed on the controller script. This also means the Room Extended and subsequent classes have also been deprecated.
1 parent 216cf99 commit 1ac9bcc

File tree

9 files changed

+451
-147
lines changed

9 files changed

+451
-147
lines changed

Assets/VRTK/Documentation/API.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ A collection of scripts that provide varying methods of moving the user around t
19631963
* [Move In Place](#move-in-place-vrtk_moveinplace)
19641964
* [Player Climb](#player-climb-vrtk_playerclimb)
19651965
* [Slingshot Jump](#slingshot-jump-vrtk_slingshotjump)
1966-
* [Room Extender](#room-extender-vrtk_roomextender)
1966+
* [Step Multiplier](#step-multiplier-vrtk_stepmultiplier)
19671967

19681968
---
19691969

@@ -2560,26 +2560,28 @@ The SetCancelButton method sets the button used to cancel a slingshot jump.
25602560

25612561
---
25622562

2563-
## Room Extender (VRTK_RoomExtender)
2563+
## Step Multiplier (VRTK_StepMultiplier)
25642564

25652565
### Overview
25662566

25672567
Multiplies each real world step within the play area to enable further distances to be travelled in the virtual world.
25682568

2569-
**Script Usage:**
2570-
* Place the `VRTK_RoomExtender` script on any active scene GameObject.
2569+
**Optional Components:**
2570+
* `VRTK_ControllerEvents` - The events component to listen for the button presses on. This must be applied on the same GameObject as this script if one is not provided via the `Controller Events` parameter.
25712571

2572-
**Script Dependencies:**
2573-
* The Controller Events script on the controller Script Alias to determine when the touchpad is pressed.
2572+
**Script Usage:**
2573+
* Place the `VRTK_StepMultiplier` script on either:
2574+
* Any GameObject in the scene if no activation button is required.
2575+
* The GameObject with the Controller Events scripts if an activation button is required.
2576+
* Any other scene GameObject and provide a valid `VRTK_ControllerEvents` component to the `Controller Events` parameter of this script if an activation button is required.
25742577

25752578
### Inspector Parameters
25762579

2580+
* **Activation Button:** The controller button to activate the step multiplier effect. If it is `Undefined` then the step multiplier will always be active.
25772581
* **Movement Function:** This determines the type of movement used by the extender.
2578-
* **Additional Movement Enabled:** Enables the additional movement.
2579-
* **Additional Movement Enabled On Button Press:** If this is checked then the touchpad needs to be pressed to enable it. If this is unchecked then it is disabled by pressing the touchpad.
25802582
* **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.
25812583
* **Head Zone Radius:** This is the size of the circle in which the play area is not moved and everything is normal. If it is to low it becomes uncomfortable when crouching.
2582-
* **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.
2584+
* **Controller Events:** The Controller Events to listen for the events on. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.
25832585

25842586
### Class Variables
25852587

@@ -2589,7 +2591,7 @@ Multiplies each real world step within the play area to enable further distances
25892591

25902592
### Example
25912593

2592-
`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.
2594+
`VRTK/Examples/028_CameraRig_RoomExtender` shows how the Step Multiplier can be used to move around the scene with multiplied steps.
25932595

25942596
---
25952597

0 commit comments

Comments
 (0)