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

ScaleTool

The ScaleTool we wrote for HoloLens doubled as a teaching example of the GestureRecognizer, and thus made things more complicated than they should be. For the mobile version, we'll just rewrite the script so it's much more similar to the MoveTool one. Here is the whole thing:

File: ScaleTool.csusing UnityEngine; public class ScaleTool : MonoBehaviour { private PictureController picture; private bool isEditing = false; private Vector3 originaButtonScale; //Used to calculate the mouse position private Vector3 startPosition = Vector3.zero; private Vector3 currentPosition = Vector3.zero; private Vector3 initialScale = Vector3.zero; void Start() { picture = GetComponentInParent<PictureController>(); originaButtonScale = transform.localScale; ...
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