0c Unity, VRTK, Simulator Camera


Written by Alex Rickett

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

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

Download this script file:

     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

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

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

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

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:
+ 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