Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Augmented Reality for Developers

You're reading from   Augmented Reality for Developers Build practical augmented reality applications with Unity, ARCore, ARKit, and Vuforia

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781787286436
Length 548 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
 Linowes Linowes
Author Profile Icon Linowes
Linowes
 Babilinski Babilinski
Author Profile Icon Babilinski
Babilinski
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Augment Your World FREE CHAPTER 2. Setting Up Your System 3. Building Your App 4. Augmented Business Cards 5. AR Solar System 6. How to Change a Flat Tire 7. Augmenting the Instruction Manual 8. Room Decoration with AR 9. Poke the Ball Game

Playing alternative games


We have provided a Unity package with several ball games, including basketball, football, and a paper ball. Each game has assets for goals, court floor, and balls, as shown in the following images:

The following are the corresponding ball assets we provide for each ball game type:

We've designed the assets so each court, goal, and ball are together in its own prefab.

Setting up the scene with ball games

Let's add the new ball games to the scene and add the components they need, which we wrote in this chapter.

For each prefab basketball, football, and paperball:

  1. From the Project Assets/BallGameArt/Prefabs folder, drag the prefab into the Hierarchy as a child of ThrowingGame.
  2. On the ball game object itself, add the BallGame script as a component.
  3. On its ball object, add the ThrowControl script.
  4. On its goal object, add the CollisionBehavior script.
  5. Add to the OnCollision() list, drag the GoalCanvas to the Object slot and set the GameObject.SetActive function, and then check...
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 $15.99/month. Cancel anytime
Visually different images