Getting started with VR

How to use the Cardboard Camera Script

Beginner Tutorial

Goo Learn
Getting started with VR

Tags

vr
cardboard

In this tutorial you will learn about:

Importing assets
Publishing

In this tutorial we will show how to use the VR camera script from the asset library.


Tags

vr
cardboard

In this tutorial you will learn about:

Importing assets
Publishing

Duration:

20 minutes


Last updated on:

May 23, 2016

Create the scene

  1. Start Goo Create by opening Goo Create in your browser.
  2. Click "New Scene"
  3. Choose Default scene.
  4. Enter a scene name and click Create.

Import the Cardboard VR Camera

Open the Asset Library by clicking Import Assets in the top menu.

Search for “Cardboard VR Camera” and double-click the script asset to add it to your scene.

Wait for the script to load, then drag the VR Camera entity from the Asset bin onto the viewport.

Select the VR Camera entity, open the Camera component panel, and check the Main Camera checkbox. This make the engine render from this camera when the scene starts.

Optional: In the Script component panel on the camera, you find various settings for the VR. You can enable/disable scripts (fullscreen or stereoscopic rendering) or tweak parameters.

Try it!

Press play. Notice that nothing happens. What?

Actually, the reason why is simple. The scene is empty and the skysphere is symmetric, so you can’t see the stereoscopic rendering. (Also, you cannot look around, but let’s worry about that later).

To notice the stereoscopic rendering, we need to add something to the scene.

Add something to the scene

Click Import Assets again. Search for “zombie” and select the Zombie Character.

When the asset is loaded, drag and drop the Zombie entity from the Asset bin onto the viewport. Place it in front of the camera: select the camera and drag it backwards using the tranform gizmo.

Try it on your phone

Now press play to preview the scene. You will notice that you see two zombies! Stereoscopic vision! But hey, you can’t look around… That’s because the desktop computer you’re using doesn’t have any orientation sensors. Let’s try it on a smartphone instead!

Click Scene > Publish from the top menu and then the blue Publish button at the bottom of the dialog.

Open the scene on your smartphone browser. You now get stereoscopic rendering and lookaround!

Done

You’ve now added a VR camera to your scene. Now you can make all sorts of cool VR experiments.

Go back to the overview page
Beginner course