O'Reilly logo

Virtual Reality Blueprints by John Williamson, Charles Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a 3D camera

A 3D camera will be used to provide the first-person view needed in a VR experience. It will also be the origin point for our graphic Raycaster. Before implementing the new camera, we need to delete the existing Main Camera GameObject:

  1. Right-click the Main Camera item and choose Delete. Without a camera, Display 1 No camera rendering will be displayed in the Game window.
  2. Navigate to the Project/OVR/Prefab directory and locate the OVRCameraRig prefab. Drag the OVRCameraRig to the Player GameObject. The OVRCameraRig will appear as a sub-item to the Player.
  3. Move the camera (not the Player GameObject) to 0,0.5,0.
  4. Save the ShootingRange scene.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required