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

VR Simulator

Overview

The VRSimulatorCameraRig prefab is a mock Camera Rig set up that can be used to develop with VRTK without the need for VR Hardware.

Use the mouse and keyboard to move around both play area and hands and interacting with objects without the need of a hmd or VR controls.

Inspector Parameters

  • Show Control Hints: Show control information in the upper left corner of the screen.
  • Hide Hands At Switch: Hide hands when disabling them.
  • Reset Hands At Switch: Reset hand position and rotation when enabling them.
  • Mouse Movement Input: Whether mouse movement always acts as input or requires a button press.
  • Lock Mouse To View: Lock the mouse cursor to the game window when the mouse movement key is pressed.
  • Hand Move Multiplier: Adjust hand movement speed.
  • Hand Rotation Multiplier: Adjust hand rotation speed.
  • Player Move Multiplier: Adjust player movement speed.
  • Player Rotation Multiplier: Adjust player rotation speed.
  • Player Sprint Multiplier: Adjust player sprint speed.
  • Mouse Movement Key: Key used to enable mouse input if a button press is required.
  • Toggle Control Hints: Key used to toggle control hints on/off.
  • Change Hands: Key used to switch between left and righ hand.
  • Hands On Off: Key used to switch hands On/Off.
  • Rotation Position: Key used to switch between positional and rotational movement.
  • Change Axis: Key used to switch between X/Y and X/Z axis.
  • Distance Pickup Left: Key used to distance pickup with left hand.
  • Distance Pickup Right: Key used to distance pickup with right hand.
  • Distance Pickup Modifier: Key used to enable distance pickup.
  • Move Forward: Key used to move forward.
  • Move Left: Key used to move to the left.
  • Move Backward: Key used to move backwards.
  • Move Right: Key used to move to the right.
  • Sprint: Key used to sprint.
  • Trigger Alias: Key used to simulate trigger button.
  • Grip Alias: Key used to simulate grip button.
  • Touchpad Alias: Key used to simulate touchpad button.
  • Button One Alias: Key used to simulate button one.
  • Button Two Alias: Key used to simulate button two.
  • Start Menu Alias: Key used to simulate start menu button.
  • Touch Modifier: Key used to switch between button touch and button press mode.
  • Hair Touch Modifier: Key used to switch between hair touch mode.

Class Variables

  • public enum MouseInputMode - Mouse input mode types
  • Always - Mouse movement is always treated as mouse input.
  • RequiresButtonPress - Mouse movement is only treated as movement when a button is pressed.

Class Methods

FindInScene/0

public static GameObject FindInScene()

  • Parameters
  • none
  • Returns
  • GameObject - Returns the found VRSimulatorCameraRig GameObject if it is found. If it is not found then it prints a debug log error.

The FindInScene method is used to find the VRSimulatorCameraRig GameObject within the current scene.