Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Oculus Rift Development

You're reading from   Mastering Oculus Rift Development The next frontier of gaming and simulation

Arrow left icon
Product type Paperback
Published in Feb 2017
Publisher Packt
ISBN-13 9781786461155
Length 306 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Jack Donovan Jack Donovan
Author Profile Icon Jack Donovan
Jack Donovan
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Exploring a New Reality with the Oculus Rift FREE CHAPTER 2. Stepping into Virtual Reality 3. Improving Performance and Avoiding Discomfort 4. Interacting with Virtual Worlds 5. Establishing Presence 6. Adding Depth and Intuition to a User Interface 7. Hearing and Believing with 3D Audio 8. Adding Tone and Realism with Graphics 9. Bringing Players Together in VR 10. Publishing on the Oculus Store

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

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime