VR LAB – CHALLENGE 2: SET UP A VR CAMERA IN CARDBOARD

STEP 1: Create your terrain in Unity.

STEP 2: Import a Google Cardboard camera

  • If you set up your phone for Cardboard, you should’ve already visited the Google Cardboard demo download site.
  • You should have the “cardboard-unity-master” folder on your desktop or in a desired location.
  • If not, then go back to: Cardboard SDK – https://github.com/googlesamples/cardboard-unity and download the folder as a ZIP.

In Unity, import “CardboardSDKForUnity” as a custom package.

Go to Assets > Import Package > Custom Package >

In your browser window, select “CardboardSDKForUnity” in the cardboard-unity-master folder. (Select this file only – you do not need any other files from this folder.)

ImportCardboardSDK

Once you’ve imported the “CardboardSDKForUnity” package, you should see a “Cardboard” folder with several folders full of new assets.

 

UnityCardboardDownload

Once you’ve imported the “CardboardSDKForUnity” package, you should see a “Cardboard” folder with several folders full of new assets.

STEP 3: Place the Cardboard camera in your scene.

In your Cardboard folder, open up the Prefabs folder.

Drag the CardboardMain prefab into the Heirarchy.

CardboardMain

The CardboardMain prefab holds the Cardboard camera. You’ll find that it’s actually two cameras – left eye, right eye – which are situated 6 centimeters or one eye-width apart.

Left Camera x-position = -0.03 | Right Camera x-position = +0.03

CardboardCamera

 

Delete your MainCamera. Since you now have the CardboardMain camera in the scene, you don’t need two cameras.

Position the Cardboard Camera (use the transform tool) so that you capture the terrain in the way you want the player to see it.

Click the play button to view the scene. If all is well, you should see the binocular-type images:

CheckCardboardCamera

STEP 4: Push the scene into your device.

Go through the same steps you used to push the Cardboard demo scene to your device in Session 1.

ANDROID – Cardboard demo:

http://timewavefestival.com/index.php/vr-lab-cardboard-development/

IOS – Cardboard demo:

http://timewavefestival.com/index.php/vr-lab-ios-development-set-up-cardboard-demo/

Click on your terrain’s apk in your device, insert your phone into Cardboard and view!

ZombieMazeCardboard