Adding an AR prompt

Much like we did earlier in the mobile AR version of the project, we are going to provide an AR prompt for the user to center the hologram and permit us to register our 3D instruction graphics on the car's flat tire.

Let's make this prompt the center of our view. Move the main canvas over a bit, and add a circle graphic:

  1. Modify the Main Canvas Position to -0.25, 0, 0. Later, you can further adjust this and even add a little rotation along the y axis.
  2. In the project's Assets/ARGraphics/Prefabs/Sprites folder, drag the Circle2D prefab so it's an immediate child of Hologram (sibling of Main Canvas).
  3. Rename it Circle Prompt.
  4. Set its Scale to 0.06, 0.06, 0.06.

Your scene now looks like this:

While we're here, add a Box Collider to the circle graphic, as we'll need it next to select it for moving and placing the hologram in the world.

  1. With Circle Prompt selected, Add Component Box Collider.

The Inspector for the Circle Prompt is shown in the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset