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)

To get the most out of this book

Before getting started with the projects outlined in this book, you will need a few things. The first is a Mac or PC computer that meets the Unity 3D system requirements. Visit https://unity3d.com/unity/system-requirements to confirm that your computer can run the software.

This book uses the free version of the Unity 3D game engine. If you are not familiar with the engine, visit https://unity3d.com/learn/tutorials/topics/interface-essentials for an introduction on the interface and basic game objects. The engine is constantly under development for improvements and feature releases. New patches are announced monthly, and major version releases appear two to three times a year. With this ever-changing nature, readers should install the latest version of Unity and visit https://unity3d.com/unity/roadmap to review any updates to the VR toolset.

Although a computer is required to develop each project, a VR headset is still needed to fully test the environments. We designed these tutorials for the Google Cardboard (Project: Trappist-1 Solar System), Samsung Gear VR (Project: Image Gallery), and Oculus Rift (Project: Zombie Shooter, Carnival Midway). However, the concepts are universal and with minor adjustments, the projects can be adapted to other devices as well.

Each hardware platform requires a Software Development Kit (SDK) or custom Unity package to facilitate communication between Unity and the VR device. Instructions for installation can be found at the beginning of each project. It is also important to check for software compatibility with your installed version of Unity. This can be done at the download site or in the VR Device section of Unity at https://docs.unity3d.com/Manual/VRDevices.html.

Download the example code files

You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Virtual-Reality-Blueprints</span>. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Finally, we will keep the project organized by dragging the OrbitController's icon to the Scripts folder."

A block of code is set as follows:

public Transform orbitPivot;
public float orbitSpeed;
public float rotationSpeed;
public float planetRadius;
public float distFromStar;

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Create a new sphere using GameObject | 3D Object | Sphere."

Warnings or important notes appear like this.
Tips and tricks appear like this.