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

VRTK_TouchpadWalking

Overview

The ability to move the play area around the game world by sliding a finger over the touchpad is achieved using this script.

The Touchpad Walking script adds a rigidbody and a box collider to the user's position to prevent them from walking through other collidable game objects.

Inspector Parameters

  • Max Walk Speed: The maximum speed the play area will be moved when the touchpad is being touched at the extremes of the axis. If a lower part of the touchpad axis is touched (nearer the centre) then the walk speed is slower.
  • Deceleration: The speed in which the play area slows down to a complete stop when the user is no longer touching the touchpad. This deceleration effect can ease any motion sickness that may be suffered.
  • Move On Button Press: If a button is defined then movement will only occur when the specified button is being held down and the touchpad axis changes.
  • Device For Direction: The direction that will be moved in is the direction of this device.

Example

VRTK/Examples/017_CameraRig_TouchpadWalking has a collection of walls and slopes that can be traversed by the user with the touchpad. There is also an area that can only be traversed if the user is crouching.