Book Image

HoloLens Beginner's Guide

By : Jason M. Odom
Book Image

HoloLens Beginner's Guide

By: Jason M. Odom

Overview of this book

HoloLens revolutionizes the way we work and interact with the virtual world. HoloLens brings you the amazing world of augmented reality and provides an opportunity to explore it like never before. This is the best book for developers who want to start creating interactive and intuitive augmented reality apps for the HoloLens platform. You will start with a walkthrough of the HoloLens hardware before creating your first app. Next you will be introduced to the various HoloLens sensors and find out how to program them efficiently so that they can interact with the real world seamlessly. Moving on, you will learn how to create smart animations and add video overlay that implements real-time tracking and motion-sensing abilities to your HoloLens app. Finally, you will learn how to test your app effectively.
Table of Contents (18 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface

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