Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn ARCore - Fundamentals of Google ARCore

You're reading from  Learn ARCore - Fundamentals of Google ARCore

Product type Book
Published in Mar 2018
Publisher Packt
ISBN-13 9781788830409
Pages 274 pages
Edition 1st Edition
Languages
Toc

Table of Contents (17) Chapters close

Title Page
Packt Upsell
Contributors
Preface
1. Getting Started 2. ARCore on Android 3. ARCore on Unity 4. ARCore on the Web 5. Real-World Motion Tracking 6. Understanding the Environment 7. Light Estimation 8. Recognizing the Environment 9. Blending Light for Architectural Design 10. Mixing in Mixed Reality 11. Performance Tips and Troubleshooting 1. Other Books You May Enjoy Index

Interacting with the environment


We know that ARCore will provide us with identified feature points and planes/surfaces it recognizes around the user. From those identified points or planes, we can attach virtual objects. Since ARCore keeps track of these points and planes for us, as the user moves objects, those that are attached to a plane remain fixed. Except, how do we determine where a user is trying to place an object? In order to do that, we use a technique called ray casting. Ray casting takes the point of touch in two dimensions and casts a ray into the scene. This ray is then tested against other objects in the scene for collisions. The following diagram shows how this works:

Example of ray casting from device screen to 3D space

You, of course, have likely already seen this work countless times. Not only the sample app, but virtually every 3D application uses ray casting for object interaction and collision detection. Now that we understand how ray casting works, let's see how this...

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}