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

Wire capture button to UDT capture event

To enable user defined target (UDT) events, we need to add Vuforia's UDT Event Handler component to the UserDefinedTargetBuilder:

  1. With UserDefinedTargetBuilder selected in Hierarchy, Add Component UDT Event Handler.
  2. Drag the UserDefinedTarget from Hierarchy onto the Image Target Template slot.

Now we can tell the button that OnClick events should call the BuildNewTarget() function:

  1. In the Capture Target Button's Inspector, press the + on OnClick().
  2. Drag the UserDefinedTargetBuilder onto the Object slot.
  3. And set the function to BuildNewTarget().

The following screenshot shows the Capture Button OnClick setup for the UDT Event Handler:

Save your work. Now when you press Play, point your webcam at ...

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