Adding visual helpers to the AR Prompt
Our plan is for the user to capture an image of his flat tire and then register augmented graphics to the captured image target. We are not so advanced as to have artificial intelligence (AI) image recognition (sorry, that's beyond the scope of this book), so we're going to rely a little bit on our user to choose a capture that's approximately the right position and size for our illustrations. Therefore, we need to provide some visual helpers to guide the user.
Adding a cursor
First we will add a small cursor to the middle of the screen, to indicate where the center of the car's tire is:
- In
Hierarchy
, selectAR Prompt
and createUI | Image
; name itCenter Cursor
. - Set its
Source Image
sprite (by clicking the little doughnut icon) toKnob
. - Change its
Scale
to0.2
,0.2
,0.2
.
If you press Play
, I think you'll agree that's helpful.
Adding a registration target
The cursor helps guide the position of the capture. We also need something to guide the size. A circle...