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)

Making objects grabbable

Our carnival midway is progressing nicely and with a teleporting function in place, the scene is becoming a fulfilling VR experience. In this next step, we will build the functions that make it possible to pick up and swing the matter for the Wacky Moles game and throw softballs in the Milk Bottle Toss game. If you have experience with the OVRGrabber and OVRGrabble scripts, feel free to implement the function and move on to the next section.

Follow along if this is your first time using these scripts:

  1. Drill down to the TrackingSpace of the items in the OVRPlayerController prefab, as shown in Figure 7.18.
  2. Right-click on the LeftHandAnchor and choose 3D Object | Sphere. Rename the sphere LeftGrabber and set its scale to (0.2, 0.2, 0.2).
  3. Complete this for the RightHandAnchor as well, naming the object RightGrabber. Figure 7.18 shows the LeftGrabber and RightGrabber...