Converting existing applications

Converting ShadowDemo

You can download the shadow demo from here: http://unity3d.com/support/resources/example-projects/shadowdemo

- Simply add the MiddleVR package and the VRManager and leave the SimpleCluster option of the VRManager checked.

- You can add the VRActor script to objects that you want to pick. Make sure to edit the VirtualCluster.vrx configuration file to configure your Wand.

- In the Player Settings, disable the "Display Resolution Dialog" and the "Use Player Log" options.

- In the Quality settings, make sure that VSyncCount is set to "Don't Sync"

- In the Build Settings, make sure that the current scene is build ("Add Current") Testing:

- Run the VRDaemon on your computer.

- Run the resulting .exe through the Simulations tab of the GUI.

- Enjoy.

Converting Car tutorial

You can download the car tutorial from here: http://unity3d.com/support/resources/tutorials/car-tutorial

We will have the car move with the configured Wand device.

- Open CompleteScene

- Import MVR package and insert VRManager.

- Specify the Car gameobject as the RootNode in the VRManager options

- Disable "Show Wand"

- Look at the "VRWand" object, child of the VRManager. Disable the VRWand Navigation, otherwise you will navigate around the car with the wand.

- Edit the Car.JS script: In the GetInput function, replace :

throttle = Input.GetAxis("Vertical");

steer = Input.GetAxis("Horizontal");

By:

var vrmgr : GameObject;

vrmgr = GameObject.Find("VRManager");

var script : VRManagerScript; script = null;

if( vrmgr != null ) {

script = vrmgr.GetComponent("VRManagerScript");

}

if( script != null ) {

// Wand data throttle = script.WandAxisVertical;

steer = script.WandAxisHorizontal;

// Left

if( script.IsKeyPressed(0xCB) ) { steer = -1; }

// Right

if( script.IsKeyPressed(0xCD) ) { steer = 1; }

// Up

if( script.IsKeyPressed(0xC8) ) { throttle = 1; }

// Down

if( script.IsKeyPressed(0xD0) ) { throttle = -1; } }

else { throttle = Input.GetAxis("Vertical"); steer = Input.GetAxis("Horizontal");

}

When you get back to Unity, it should complain that : "The name 'VRManagerScript' does not denote a valid type ('not found')."

This means that the MiddleVR scripts are compiled *after* this javascript. You simply have to move the MiddleVR folder in the "Pro Standard Assets" folder. If you can't, close your script editor (Visual Studio or MonoDevelop). See for more info: http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html

- Get rid of the Skybox or replace it with a giant sphere or cube.

- Modify the "Birds" prefab (Prefabs/VFX/Birds):

-- in the particle emitter, set all components of Rnd Velocity to 0.

-- Make sure Rnd Angular Velocity is 0, Rnd Rotation is not checked.

-- in the particle animator, set all Rnd Force components to 0.

- The water shader will have problems, it hasn't been addressed yet.

- In the Player Settings, disable the "Display Resolution Dialog" and the "Use Player Log" options.

- In the Quality settings, make sure that VSyncCount is set to "Don't Sync"

- In the Build Settings, make sure that the current scene is build ("Add Current")

Converting AngryBot

This is a quick conversion that does not involve yet a first person perspective:

- Open AngryBots

- Import MVR package and insert VRManager.

- In the Player Settings, disable the "Display Resolution Dialog" option.

- In the Quality settings, make sure that VSyncCount is set to "Don't Sync"

- In the Build Settings, make sure that the current scene is build ("Add Current")

- In the Player Settings, disable the "Display Resolution Dialog" and the "Use Player Log" options.

- In the Quality settings, make sure that VSyncCount is set to "Don't Sync"

- In the Build Settings, make sure that the current scene is build ("Add Current")