Using Vuforia’s Unity package it is easy to develop an AR based application. The full tutorials can be found in Vuforia’s web page: Getting Started with the Unity Extension. Here is the outline:
- Add a few image targets using TargetManager. To do so, go to here and click “Add Target” button, upload a few images as the target to detect/recognize.
- Export the targets uploaded, and you will be prompted a file name to download, let’s say test.uniypackage.
- Drag the test.uniypackage to Unity, import.
- Remove the default “Main Camera”;
- Drag an ARCamera from prefab;
- Drag an ImageTarget from prefab;
- Select the ImageTarget game object, and in the inspector, set the data set and images to detect. Here the data set name is “test”, which we just downloaded from web.
- Add a 3D game object, e.g. a sphere, attach it as a child game object of the ImageTarget game object
Now if you run the app in Unity, you will see a live web cam view, but when you target your camera to the preset image targets, you will NOT see the cube or the sphere!
The solution is very simple: you have to turn on some settings:
- Select the ARCamera game object
- Check below two check boxes:
- Re-run the app, now you should see the cube or the sphere when you move your web cam to view the target images: