Book Image

Mastering Oculus Rift Development

By : Jack Donovan
Book Image

Mastering Oculus Rift Development

By: Jack Donovan

Overview of this book

Virtual reality (VR) is changing the world of gaming and entertainment as we know it. VR headsets such as the Oculus Rift immerse players in a virtual world by tracking their head movements and simulating depth, giving them the feeling that they are actually present in the environment. We will first use the Oculus SDK in the book and will then move on to the widely popular Unity Engine, showing you how you can add that extra edge to your VR games using the power of Unity. In this book, you’ll learn how to take advantage of this new medium by designing around each of its unique features. This book will demonstrate the Unity 5 game engine, one of most widely-used engines for VR development, and will take you through a comprehensive project that covers everything necessary to create and publish a complete VR experience for the Oculus Rift. You will also be able to identify the common perils and pitfalls of VR development to ensure that your audience has the most comfortable experience possible. By the end of the book, you will be able to create an advanced VR game for the Oculus Rift, and you’ll have everything you need to bring your ideas into a new reality.
Table of Contents (17 chapters)
Mastering Oculus Rift Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Populating the game world with resources


Adding resources to a game map adds an element of strategy and rewards players for exploring areas of the map where there might not be frequent combat. In this section, we'll build upon our old practice dummy prefab and modify it to drop resources that will be required to activate the walls we created in the last section.

To begin, we'll create a new prefab for the resource itself. Create a new Sphere object in your scene and name it EnergyOrb. Create a new material in your Materials folder, name it EnergyOrbMat, and apply it to the sphere.

Open the EnergyOrbMat material in the Inspector. Set the Metallic value to 0.5, Smoothness value to 0.75, and the Emission color to yellow, as shown in the following screenshot:

You should now have a shiny, glowing yellow orb---a perfect object to stand out as a collectible. Add a Rigidbody component to the EnergyOrb from the Inspector. Set the Mass field to 0.25:

Create a new tag called EnergyOrb in the Inspector...