Book Image

Virtual Reality Blueprints

By : Charles Palmer, John Williamson
Book Image

Virtual Reality Blueprints

By: Charles Palmer, John Williamson

Overview of this book

Are you new to virtual reality? Do you want to create exciting interactive VR applications? There's no need to be daunted by the thought of creating interactive VR applications, it's much easier than you think with this hands-on, project-based guide that will take you through VR development essentials for desktop and mobile-based games and applications. Explore the three top platforms—Cardboard VR, Gear VR, and OculusVR —to design immersive experiences from scratch. You’ll start by understanding the science-fiction roots of virtual reality and then build your first VR experience using Cardboard VR. You'll then delve into user interactions in virtual space for the Google Cardboard then move on to creating a virtual gallery with Gear VR. Then you will learn all about virtual movements, state machines, and spawning while you shoot zombies in the Oculus Rift headset. Next, you'll construct a Carnival Midway, complete with two common games to entertain players. Along the way, you will explore the best practices for VR development, review game design tips, discuss methods for combating motion sickness and identify alternate uses for VR applications
Table of Contents (12 chapters)

Creating the Player GameObject

The player is made up of a single GameObject. This object will contain the first-person camera, a collider, and a light source. Our GameObject will not need a light source until we address the environment in the Setting the mood section, but we can create the other components by following the steps listed here:

  1. Create an empty GameObject in the Hierarchy panel, rename it Player, and move it to 0,1,0.5 using the Inspector. This object will house the VR camera and scripts needed for player control.
  2. Change the Player tag from Untagged to Player using the Inspector panel.
  3. With the object still selected, add a Capsule Collider by clicking the Add Component button in the Inspector window. Enter capsule in the search field or select Physics from the list of categories. Next, select Capsule Collider from the list to assign it to the Player GameObject.