O'Reilly logo

Mastering Oculus Rift Development by Jack Donovan

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

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

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