Educational guides and tutorials to accelerate learning.

> Home > How-to Guides > CameraRigs

Adding The SimulatedCameraRig

  • Level: Beginner

  • Reading Time: 5 minutes

  • Checked with: Unity 2018.3.10f1


The Simulated CameraRig prefab provides a simulated setup that requires no XR hardware to develop and build with. It creates a pseudo headset and controllers that can be manipulated via the mouse and keyboard, which helps testing and building virtual environments without the need for actual hardware to be plugged in.

The outcome of this guide is to learn how to add the Simulated CameraRig prefab to the scene and configure it along with a TrackedAlias prefab.

Useful definitions


Let’s Start

Step 1

Expand the VRTK Prefabs Package directory in the Unity Project window until the Prefabs -> VRTK Prefabs -> CameraRig -> SimulatedCameraRig directory is visible and select the SimulatedCameraRig directory so the contents are displayed.

Unity Project Window

Step 2

Select the SimulatedCameraRig prefab then drag and drop it into the Unity Hierarchy window.

Drag Simulated CameraRig To Hierarchy

Step 3

Select the TrackedAlias GameObject in the Unity Hierarchy window then increase the Camera Rigs -> Elements -> Size property by 1 on the Tracked Alias Facade component

Note: In this example we’ll be setting it to 2 as there is already a UnityXRCameraRig in the scene.

Tracked Alias Facade CameraRigs Size

Step 4

Drag and drop the SimulatedCameraRig GameObject from the Unity Hierarchy window into the newly displayed Element 1 field within the Elements parameter on the Tracked Alias Facade component.

Drag And Drop Simulated CameraRig Into Tracked Alias CameraRigs


Now you have a UnityXR CameraRig in the scene along with a Simulated CameraRig. Only one CameraRig should be enabled in the scene at any one time, so for now disable the SimulatedCameraRig GameObject and play the Unity scene.

The scene will start using the UnityXR CameraRig and display via the connected XR hardware, however if you disable the UnityXRCameraRig GameObject in the Unity Hierarchy window and then enable the SimulatedCameraRig GameObject in the Unity Hierarchy window then the active scene CameraRig will switch to being the Simulated CameraRig.

The TrackedAlias prefab will automatically update to use the newly activated CameraRig and allow you to continue playing the scene in the simulated mode.

SimulatedCameraRig In Scene