DMC 1_Cardboard Demo (1)

Now we will make a cardboard demo app.

Make a new project. Go to buildsetting and swithch platform from PC to iOS.

And in the assets, click import import cardboard sdk and demo package file.

Next, delete main camera.

스크린샷 2016-04-18 오후 12.16.30

And we will make a plane. Go to GameObject > 3D Object > Plane.

스크린샷 2016-04-18 오후 12.17.04.png

And I made its scale 4/1/4.

스크린샷 2016-04-18 오후 12.18.02

스크린샷 2016-04-18 오후 12.18.18.png

And in the ‘mesh renderer’, you can change plane’s skin.

스크린샷 2016-04-18 오후 12.20.35

Click the circle beside Element 0.

스크린샷 2016-04-18 오후 12.22.38.png

I selected GroundPlane. You can download other free ground plane in asset store.

Next, go to the assets > prefabs, select ‘cardboardMain’.

스크린샷 2016-04-18 오후 12.23.55.png

Drag it to the center.

스크린샷 2016-04-18 오후 12.25.13.png

And the position is 1/1/1.

스크린샷 2016-04-18 오후 12.27.05.png

스크린샷 2016-04-18 오후 12.27.16.png

And we will add a sphere.

스크린샷 2016-04-18 오후 12.33.29

스크린샷 2016-04-18 오후 12.34.48

The sphere’s position is 1/1/5.

스크린샷 2016-04-18 오후 12.34.57.png

And add a cube. (Position : 1/1/-5)

스크린샷 2016-04-18 오후 12.37.12.png

스크린샷 2016-04-18 오후 12.37.31.png

CardboardMain is parents. There’s two little different camera. It allows to look around properly.

스크린샷 2016-04-18 오후 12.41.27

Now let’s create ‘dots’.

In the assets, UI > prefabs > cardboardReticle.

스크린샷 2016-04-18 오후 12.42.16.png

Do not drag into the scene. Just drag it to the hierarchy inside Main Camera.

스크린샷 2016-04-18 오후 12.43.40.png

스크린샷 2016-04-18 오후 12.44.39

Our dots!! Nice.

We can also change the color of dots.

스크린샷 2016-04-18 오후 12.46.27.png

스크린샷 2016-04-18 오후 12.46.42.pngSo pretty..

스크린샷 2016-04-25 오전 10.36.30.png

Next, we will add an Event System.

스크린샷 2016-04-25 오전 10.38.50

Add a component ‘GazeInputModule’.

And in the Main Camera, we will add a component ‘Physics 2D Raycaster’.

스크린샷 2016-04-25 오전 10.43.52.png

And inside the cube, we will add component ‘Event Trigger’.

스크린샷 2016-04-25 오전 10.48.51.png

I did it same to the sphere.

스크린샷 2016-04-25 오전 10.49.03.png

Inside the ‘Event Trigger’, click Add New Event Type. And there’s various option we can choose. We selected ‘PointerEnter’.

스크린샷 2016-04-25 오전 10.50.34.png

Next, choose function. BoxCollider > bool isTrigger.

스크린샷 2016-04-25 오전 10.54.49.png

And choose cube by clicking little circle. (Do it same with sphere.)

Now if we gaze the cube or sphere, the dot will get bigger.

And we will going to walk around to the plane.

To walk around, we have to add some code.

I downloaded from our DMC1 blog.

Inside the assets, make a new folder named ‘Scripts’.

And drag the code inside to the folder.

You can find it in the filter, or asset folder.

스크린샷 2016-04-25 오전 11.41.13.png

스크린샷 2016-04-25 오전 11.45.54.png

Set a speed, and check the box ‘Walk When Look Down’.

Now we can walk around our plane when we look down!

스크린샷 2016-04-30 오후 7.19.37.png

And when we look at our cube or sphere, the dot gets bigger.

스크린샷 2016-04-30 오후 7.18.58.png


Now we will make a moving cube.

Create a new scene. And don’t delete Main Camera.

Make a plane, and add a cube on it.

And drag ‘accelerometer’ script to the cube inspector.

스크린샷 2016-04-30 오후 8.01.06.png


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s