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

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 ...

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