Augmented Reality Tutorial for Beginners With Vuforia and Unity 3D




About: My name is Matthew and I attend the University of Pittsburgh. Currently I am a senior, going for a bachelors in Information Science with a minor in CS. Current interests include augmented reality, virtual re...

Intro: Augmented Reality Tutorial for Beginners With Vuforia and Unity 3D

This tutorial shows you how to make an augmented reality app in Unity 3D with Vuforia. The game is an interactive ball maze that can be built to Android or IOS. It utilizes the front facing camera to track an image target. This video also goes through how to build the app for Google Cardboard so the game can be played with virtual reality headsets.

Print the picture of the maze above, that will be the image target that your camera is going to track. I made the image target black and white so if you're out of colored ink like me, don't worry.

Create a developer account on Vuforia and add the above picture to your image target database. Download a copy of the database for Unity 3D as well as the Vuforia plugin for Unity.

Download Unity3D if you don't already have it and make sure to add the modules for Android or IOS depending on what you want to build to.

Step 1: Set Up the Scene.

Import the Vuforia plugin and your image database into Unity.

In the Vuforia folder, click and drag the ARCamera prefab into the hierarchy.

Find the imageTarget prefab in the same folder and drag it into the hierarchy as well.

In the scene, move the imageTarget prefab away from the camera by a few units.

Drag it onto the ARCamera prefab (making it a child).

Using cubes create a 3D copy of the maze on top of the image target.

Make a small sphere and create a new material.

Drag the new material onto the sphere and make it a bright color.

Step 2: Almost Done...

Create a cube and place it above the maze (this is going to be the spawn point for the sphere).

Remove the mesh renderer and collider of the sphere.

Add a C# script to the sphere, call it "ballScript" and paste this code:

using UnityEngine;
using System.Collections;

public class ballScript : MonoBehaviour {

	public GameObject plane;

	public GameObject spawnPoint;

	// Use this for initialization
	void Start () {
	// Update is called once per frame
	void Update () {

		if (transform.position.y < plane.transform.position.y - 10) {

			transform.position = spawnPoint.transform.position;


Step 3: Ready to Build.

In the scene view, click the sphere, and on the ball script, drag the plane and the cube into their respective places.

In the hierarchy, drag the plane, the sphere, and the cube on top of the image target to make them children.

Click play and all should be well.

Now you are ready to build for Android or IOS.

If you want to build for Google Cardboard, click the ARCamera in the hierarchy and go to Digitial Eyewear Behavior Script in the inspector. Choose video see through -> Vuforia -> Cardboard V1. Now you have both stereo cameras and when you build to Android or IOS the app will work in your virtual reality headset.

Any questions don't hesitate to ask. Watch the video for more complete instructions.

Let me know in the comments if you have any requests for future videos.

2 People Made This Project!


  • Fix It! Contest

    Fix It! Contest
  • Audio Contest 2018

    Audio Contest 2018
  • Furniture Contest 2018

    Furniture Contest 2018

9 Discussions


2 months ago

after adding the database it shows no texure on it. Cany suggestion?


Question 5 months ago

ball in the maze is not rolling


Question 5 months ago

tha ball in the ,maze is not rolling


10 months ago

How i can my asset ?


1 year ago

I dont to works mya web cam when work by ubunu 16.04 ? Cam somebody please help?


1 year ago

hello If I send you my unity package Do you have time for check it because that have one problem?


1 year ago

hallo.why the ball dint move when i scan the image target?

1 reply

Reply 1 year ago

Hi, my friend, how do I download the tutorial?