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

A quick example


Before we dig deep into the theory, let's take some time to make a class and see it in action.

First, we will need to create a sphere in our Hierarchy view:

  1. Click on the Create button.
  2. Hover over 3D object and click on sphere.
  3. Name the sphere Ball.
  4. In the Inspector, make sure that all position elements are 0. Alternatively, you can simply click on the gear icon and select reset.
  5. With the sphere reset, change its position.x to 3.05, position.y to 0.87, and position.z to 4.15.

Now, we will add a script file to the ball:

  1. Click on the Add Component button in the Inspector.
  2. Scroll down to New Script and click on it.
  3. Name the script LaunchBall; click on Create and then on Add.
  4. Double-click on the Launchball script in the Inspector.

Visual Studio should be loading now. Once it is loaded, you should see a blank class called LaunchBall with two using statements and two methods, Start and Update. Now, we will need to copy or type the following code into that class.

Let's take a look at Part 1 of...

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