Last time, we made a box named lionflakes.
I cut the development paper,
And glue it. This is the complete work of lionflakes. We will make a AR using this box.
First, make a new project.
Go to build settings and change platform into iOS.
Next, go to player settings and uncheck portrait and portrait upside down.
Don’t forget to change company name and project name!
Next, go to assets > import package > custom package.
Import vuforia unity package that we downloaded in Vuforia website.
Go to class website and download the file in Class 13.
You will see this folders when you download it.
Go to hierarchy and delete the main camera. And drag ‘ARCamera’ into hierarchy. It is in the vuforia prefabs folder. And set its position 0:0:0.
Next, let’s save scene!
Write the scene name ‘lionflakes’.
Next, go to Vuforia website. We will create a new database. Set its name ‘arClassmultiTarget’. And select its type ‘Device’.
Then new database will be appear in the target manager. Click the one that you made right before.
And we will add a new target. This process is little bit different from other ones. Select its type ‘Cuboid’. And set its dimension 9:12:9. Write ‘Flakesbox’ in the name box. And click ‘Add’ button.
Then you will see the development. Upload images that matches with the development position. The position is written in the file name.
You will see this image when you finally upload the images.
If you double click it, you will see the stars. Many stars means that the camera recognizes your image well.
Next, click download database. Select ‘Unity Editor’ in the development platform. Click download button.
Go to assets > import package > custom package.
And bring database unity package file.
Next, click ARCamera and go to the inspector. Go to Database Load Behavior (Script) and check ‘Load arClass~’. And also check ‘Activate’.
And go to assets > Vuforia > prefabs > MultiTarget. Drag it into the scene.
Go to the inspector and find Multi Target Behaviour (Script). Select Database that we download. And also select multi target ‘Flakesbox’.
Then lion flakes box will appear in the scene. And make a new cube.
Drag it into MultiTarget and change its name ‘wireframe’.
And set its size that fits with lionflakes box.
In the inspector, there is a mesh renderer. Select element 0 ‘texturewireframe’.
Next, go to assets > models > bowlspoon and drag it into the scene. Put it inside the MultiTarget.
Select polySurface1 and change its element 0 ‘texturebowlandspoon’.
And select polySurface2 and change its texture.
And find the script named ‘Rotate Around (Script)’ and drag it into the inspector of ‘bowlspoon2’.
Oops! I forgot to put the license key. Go to Vuforia Website and copy the license key of arClassDemo. You don’t have to make it again.
Select ARCamera and go to the inspector. Paste the license key in the Vuforia Behavior App License Key.
After finishing all these process and click play button, you will see bowlspoon rotating around the lionflakes box! Cool~