0c Unity, VRTK, Simulator Camera

smallarrows.GIF

Written by Alex Rickett

This tutoral only works if you have already set up VRTK and SteamVR. See previous tutorial.

VRTK_simulator_icons
Simulator icon


VRTK_1aAdd a Simulator Camera
This will be useful when you do not have a Vive Headset to use. You can add this later if you prefer.

Create a 2nd empty child under VRTK_SDK manager, (use the right mouse in the Hierarchy tab, select Create Empty)
     Rename Game Object to Simulator



Select Assets->VRTK->Prefabs

     Drag and drop VRSimulatorCameraRig on to Simulator in the Hierarchy
VRTK_simulator_cam_rig



Download this script file:

EasyMouseAndKeyboadVRControls.zip
     Save to your downloads folder
     PC: Right click to Extract All...
     Place the EasyMouseAndKeyboadVRControls.cs into your Assets folder


Select the VRSimulatorCameraRig in the Hierarchy window
Drag and drop the EasyMouseAndKeyboardVRControls.cs script over the VRSimulatorCameraRig
VRTK_simulator_script


Select  Simulator in the Hierarchy
choose Add Component in the Inspector tab
          Search for
VRTK_SDK Setup

Select Simulator in the Hierarchy, choose the drop down menu under VRTK_SDK Setup -> Quick Select in the Inspector
          Choose Simulator
 VRTK_simulator_setup


Drag and drop Assets->VRTK->Prefabs->SDKSetupSwitcher into the Hierarchy (not a child of anything).

Select VRTK_SDKmanager in the Hierarchy, hit Auto Populate in the Inspector
VRTK_simulator

USAGE
In upper right you can hit a button to switch between the VR Simulator (mouse and keyboard), and using the Vive (SteamVR)
Note: SteamVR will appear as None if the headset isn't tracking, or not visible to the lighthouses.
When you want to hide this button, just disable the SDKSetupSwitcher object.

Simulator controls:
WASD
+ mouse

First person controls:
C  Hold to push the left controller forward (to touch something farther away)

V Hold to push the right controller forward (to touch or grab something farther away)
Left click grab an object, (simulates vive trigger).  This only works for the right controller.

Q  teleport