Removing the AR prompt during tracking

It is really great having the graphics on the screen to assist the user while capturing a target. But once it's captured, we want to hide the prompts and display only the annotation graphics instead. If the camera loses tracking, we can restore the UI so the user has the option to recapture.

To do this, we need a script that disables Canvas elements. Unfortunately, presently the Vuforia components are only implemented to disable object renderers, and it does not support canvases. So, we will write our own, and we will make it generic enough to work with any GameObjects. We can do this in a script, using the Vuforia Trackable Events that will be attached to the UserDefinedTarget object.

To begin, in your ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.