Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
HoloLens Beginner???s Guide

You're reading from   HoloLens Beginner???s Guide Join the AR revolution with HoloLens

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781786464729
Length 376 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jason M. Odom Jason M. Odom
Author Profile Icon Jason M. Odom
Jason M. Odom
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface Welcome to the New World FREE CHAPTER HoloWorld I am in Control User-Friendly Interface Now That Is How It Should Sound Not So Blank Spaces The Tools of the Trade Share What You Have Got Putting It All Together Fixing Problems

GameBall Prefab


The final object we need to make our game an actual game is our ball. In this section, we will create a sphere, add a couple of classes and a rigid body, apply a material, and then turn the object into a Prefab. This will be short and sweet. Let's follow the given steps:

  1. Start off by creating a sphere and ensuring that it is not a child of anything in the Hierarchy view.
  2. Rename the sphere to GameBall.
  3. Set its Position to 0,0,0 and its Scale to 0.07,0.07,0.07:
  1. In the Project view, right-click on the Materials folder. Click on Create and then click on Material.
  2. Name the new material GameBall and set the Albedo RGB values to 255,255,0--a very bright yellow.
  3. Select the GameBall material in the Project view, drag it on top of the GameBall object, and drop it:

Now we have a yellow sphere sitting on top of the camera, which we cannot quite see. Now we need to add some code and a component before we can turn this into our game object. First though, we need to take a moment to look at Tag...

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 $19.99/month. Cancel anytime
Banner background image