Skip to Content
Augmented Reality for Developers
book

Augmented Reality for Developers

by Jonathan Linowes, Krystian Babilinski
October 2017
Intermediate to advanced
548 pages
13h 23m
English
Packt Publishing
Content preview from Augmented Reality for Developers

Scaling the picture

Now we can scale the picture after each update. We will use a simple hack that ties head movement (gaze direction) to the object scale. Rather than literally casting a ray to determine a size based on gaze hit point, we'll use the head direction angle as a relative scaling factor (much like a pinch gesture is used to scale on a touch screen). By trial and error, we've decided to scale the object by 10% for each degree of head movement.

The object in our Hierarchy that is to be scaled is not the root Picture object itself, but the FramedImage object. The tool needs to know this, and will ask the PictureController for a reference to this object. Modify PictureController as follows:

File: PictureController.cs public Transform ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Augmented Reality Game Development

Augmented Reality Game Development

Micheal Lanham
Augmented Reality

Augmented Reality

Joseph Rampolla, Greg Kipper

Publisher Resources

ISBN: 9781787286436Supplemental Content