WEBVTT

00:00:00.650 --> 00:00:02.540
Hi guys,
my name is Adina Shanholtz.

00:00:02.540 --> 00:00:04.300
>> And I'm Tobias Arles.

00:00:04.300 --> 00:00:07.000
>> And I'd like to welcome
you guys to intro to VR with

00:00:07.000 --> 00:00:08.310
Google Cardboard and Unity.

00:00:09.860 --> 00:00:12.430
So today we are going to
make our first VR game,

00:00:12.430 --> 00:00:13.640
it's very simple.

00:00:13.640 --> 00:00:16.580
If you guys haven't used Unity
before that's perfectly okay.

00:00:16.580 --> 00:00:20.650
If you take a look at
my screen right here.

00:00:20.650 --> 00:00:26.660
I actually have my GitHub repo
up, my GitHub is ashanhol and

00:00:26.660 --> 00:00:31.770
the repo is CollectThemAllVR and
specifically this demo

00:00:31.770 --> 00:00:37.118
is underneath tag version 1.5
if you guys can see that.

00:00:37.118 --> 00:00:41.459
>> Also in the end there's we
links below in the description

00:00:41.459 --> 00:00:43.580
of this video.

00:00:43.580 --> 00:00:44.080
>> Right.

00:00:45.270 --> 00:00:48.270
So, let's jump in first
thing you're gonna wanna do

00:00:48.270 --> 00:00:49.800
is open up Unity.

00:00:52.753 --> 00:00:55.270
>> Is there any other special
STK's I need to download ahead

00:00:55.270 --> 00:00:56.860
of time or install.

00:00:56.860 --> 00:00:59.580
>> Yes you do, thank you so
much Tobia for bringing that up.

00:00:59.580 --> 00:01:03.840
Down at the bottom there's
actually a pre-requisite section

00:01:03.840 --> 00:01:06.570
where before you start this
video, before we jump right

00:01:06.570 --> 00:01:09.250
in, what you're going to
have to have downloaded is

00:01:09.250 --> 00:01:16.660
the Cardboard SDK as well
as latest version of Unity.

00:01:16.660 --> 00:01:18.490
If you guys have that,
then we're ready to go.

00:01:18.490 --> 00:01:21.250
And also if you were planning on
porting to your phone you should

00:01:21.250 --> 00:01:23.380
also probably have
those correct modules.

00:01:23.380 --> 00:01:27.577
So IOS, you have to download
the IOS port for Unity and

00:01:27.577 --> 00:01:29.310
Android in Android.

00:01:29.310 --> 00:01:31.150
>> Makes sense.

00:01:31.150 --> 00:01:31.780
>> Yep.

00:01:31.780 --> 00:01:34.500
So first thing we're going
to do is in this menu,

00:01:34.500 --> 00:01:36.100
it'll have a list
of your projects.

00:01:36.100 --> 00:01:38.100
But if you have none
that's also okay.

00:01:38.100 --> 00:01:39.900
I'm going to click new and

00:01:39.900 --> 00:01:43.260
I'm going to name
mine cardboard demo1.

00:01:43.260 --> 00:01:43.820
One.

00:01:43.820 --> 00:01:46.253
>> And of course this is
going to be a 3D project.

00:01:46.253 --> 00:01:48.962
>> Right, you can choose
between 2D and 3D.

00:01:48.962 --> 00:01:54.662
I'm going to definitely make
sure that 3D is checked and

00:01:54.662 --> 00:01:57.045
click create project.

00:02:00.587 --> 00:02:03.640
Awesome, so
right here is the Unity editor.

00:02:03.640 --> 00:02:07.090
Straight up this is what I
see when I open my editor.

00:02:07.090 --> 00:02:10.080
And let's just go through real
quick what everything is.

00:02:10.080 --> 00:02:13.300
Up here on the top
left is the hierarchy.

00:02:13.300 --> 00:02:16.594
This is going to be a list of
all of the game objects that

00:02:16.594 --> 00:02:19.329
are in your [CROSSTALK]
>> Can you zoom in on that

00:02:19.329 --> 00:02:19.880
for us?

00:02:19.880 --> 00:02:21.588
>> Hm?
>> Can you zoom in on that?

00:02:21.588 --> 00:02:24.461
>> I can.

00:02:24.461 --> 00:02:28.496
Hierarchy and
right here we have two objects,

00:02:28.496 --> 00:02:31.950
Main Camera and
Directional Light.

00:02:31.950 --> 00:02:34.020
Those are the only things that
are in my scene right now.

00:02:35.760 --> 00:02:37.586
The next thing is
the project view.

00:02:40.004 --> 00:02:43.250
Right here, this tab below
hierarchy is the project view.

00:02:43.250 --> 00:02:45.630
This will be where all
of our assets are.

00:02:45.630 --> 00:02:50.260
Anytime we wanna make a new
script or new material or

00:02:50.260 --> 00:02:51.970
something like that,
that'll go in our assets.

00:02:53.530 --> 00:02:56.380
Over here in the middle we
have the scene view and

00:02:56.380 --> 00:02:58.040
we have the game view.

00:02:58.040 --> 00:03:02.048
The scene view will give us, we
will be able to view the level

00:03:02.048 --> 00:03:04.934
we're building from
all points of view and

00:03:04.934 --> 00:03:08.878
the game view will be what the
player is going to be seeing.

00:03:10.212 --> 00:03:13.040
Over here on the right
is the inspector.

00:03:13.040 --> 00:03:16.000
If we click on any game object
you'll see a whole bunch of

00:03:17.820 --> 00:03:20.030
stats come up for
it and settings.

00:03:20.030 --> 00:03:23.800
We will go over some of the more
specifics of these settings

00:03:23.800 --> 00:03:26.740
as we create more game
objects in our game.

00:03:26.740 --> 00:03:29.560
>> Now if your unity editor
doesn't look quite like this,

00:03:29.560 --> 00:03:32.560
that's okay, Unity has many
different default layouts.

00:03:32.560 --> 00:03:34.710
So if you go down,
I believe it's the window tab,

00:03:34.710 --> 00:03:37.930
you can try different options
to make it look like this,

00:03:37.930 --> 00:03:39.320
which is one of
the default layouts, or

00:03:39.320 --> 00:03:41.530
just use your own if that's what
you're more comfortable with.

00:03:41.530 --> 00:03:42.590
It's all the same stuff.

00:03:42.590 --> 00:03:45.390
It's just how that
information is presented.

00:03:45.390 --> 00:03:48.910
>> If you look over at my
screen up in the top right,

00:03:48.910 --> 00:03:50.330
there's a thing
that says Layout.

00:03:50.330 --> 00:03:52.860
And it gives you a couple of
different default options

00:03:52.860 --> 00:03:54.940
of how you can change this view.

00:03:54.940 --> 00:03:57.670
I personally like mine
the way it is right now.

00:03:57.670 --> 00:04:00.220
I think it makes easier,
I like to see both the scene and

00:04:00.220 --> 00:04:00.870
the game view so

00:04:00.870 --> 00:04:04.990
just I know what my players
seeing as I'm editing my level.

00:04:04.990 --> 00:04:06.462
So anyway.

00:04:06.462 --> 00:04:07.212
What?

00:04:07.212 --> 00:04:07.821
>> It makes sense.

00:04:07.821 --> 00:04:09.780
>> Yes it does make sense.

00:04:09.780 --> 00:04:12.770
So let's jump in
the first thing,

00:04:12.770 --> 00:04:18.160
first very thing we are going to
do is import our cardboard SDK.

00:04:18.160 --> 00:04:22.625
And the way we're going to
do this, is under assets,

00:04:22.625 --> 00:04:25.610
Import Package, Custom Package.

00:04:25.610 --> 00:04:28.540
>> And this is gonna get
that package that you said

00:04:28.540 --> 00:04:30.710
we needed to have
downloaded ahead of time.

00:04:30.710 --> 00:04:33.190
>> Right.
This is the cardboard SDK.

00:04:33.190 --> 00:04:35.650
I know I saved mine
in My Downloads,

00:04:35.650 --> 00:04:37.880
it's the only thing that it's in
My Download, other than folder.

00:04:41.200 --> 00:04:46.180
And it's going to import all of
these assets straight for me.

00:04:47.660 --> 00:04:49.450
It's going to ask
which ones you want.

00:04:49.450 --> 00:04:50.540
I am importing them all.

00:04:55.380 --> 00:04:58.160
And what you're going to see
after they are done importing

00:04:58.160 --> 00:05:02.435
is two folders are going to pop
up named cardboard and plugin.

00:05:02.435 --> 00:05:09.300
Underneath assets we see
cardboard and plugins.

00:05:12.060 --> 00:05:14.870
So under assets we are actually
going to make a new folder

00:05:14.870 --> 00:05:18.040
next to these two folders
called cardboard and

00:05:18.040 --> 00:05:20.840
plugins named our assets.

00:05:20.840 --> 00:05:23.180
So the way I'm doing this,
I just right-clicked and

00:05:23.180 --> 00:05:26.880
then create folder there's also
another way that you can bring

00:05:26.880 --> 00:05:28.115
up this menu.

00:05:28.115 --> 00:05:31.410
under the project tab there's a
little thing right below it that

00:05:31.410 --> 00:05:34.190
says create and
then you can click on folder.

00:05:34.190 --> 00:05:37.540
>> And this is just a peek
into your asset folder

00:05:37.540 --> 00:05:38.450
of your project.

00:05:38.450 --> 00:05:42.221
So you know if you made a folder
in Explorer it would show up

00:05:42.221 --> 00:05:43.172
here as well.

00:05:43.172 --> 00:05:46.183
Exactly, so our assets,
we made this folder

00:05:46.183 --> 00:05:50.160
to distinguish what we've
imported already from Google.

00:05:50.160 --> 00:05:52.270
These are the ones that
are pre-done for us.

00:05:52.270 --> 00:05:54.660
And these are gonna be the ones
we write ourselves, write and

00:05:54.660 --> 00:05:55.720
create ourselves.

00:05:55.720 --> 00:05:57.390
>> And again, that's not
required for the code.

00:05:57.390 --> 00:06:00.550
But that's just what makes
things cleaner and easier for

00:06:00.550 --> 00:06:02.180
the sake of our demo.

00:06:02.180 --> 00:06:03.060
>> Exactly.

00:06:03.060 --> 00:06:05.070
In our assets,

00:06:05.070 --> 00:06:08.040
we are going to create another
new folder named scenes.

00:06:08.040 --> 00:06:10.940
And guess what we're
going to do in here?

00:06:10.940 --> 00:06:11.580
>> Put our scenes?

00:06:11.580 --> 00:06:12.820
>> We're gonna save.

00:06:12.820 --> 00:06:16.230
First thing we should
do is save our scene.

00:06:16.230 --> 00:06:19.730
So right here, the File Explorer
just kind of pops up our assets.

00:06:19.730 --> 00:06:21.440
We can click on our assets and

00:06:21.440 --> 00:06:25.220
our scenes folder and
save our playing field.

00:06:25.220 --> 00:06:25.720
Whoops.

00:06:26.720 --> 00:06:27.500
>> And just to clarify,

00:06:27.500 --> 00:06:30.230
what you're saving is this
initial scene that has

00:06:30.230 --> 00:06:31.200
the directional light and

00:06:31.200 --> 00:06:34.110
the camera that was created
when you made a new project and

00:06:34.110 --> 00:06:36.610
even though it created that
initial scene it didn't

00:06:36.610 --> 00:06:39.630
save it for us in case we
decided we didn't want it.

00:06:39.630 --> 00:06:40.920
But we've decided, yes,

00:06:40.920 --> 00:06:43.750
that's how we wanna
start our first scene.

00:06:43.750 --> 00:06:44.652
Exactly and

00:06:44.652 --> 00:06:49.261
this will be really good just
in case Unity crashes on us and.

00:06:49.261 --> 00:06:50.540
>> Yes, always save.

00:06:50.540 --> 00:06:53.380
>> Always save your stuff,
it's the first thing we do so

00:06:53.380 --> 00:06:54.710
we can keep saving throughout.

00:06:54.710 --> 00:06:56.130
>> Early and often.

00:06:56.130 --> 00:06:57.520
>> Early and often.

00:06:57.520 --> 00:07:00.374
>> So, the first thing now that
we've got everything kind of

00:07:00.374 --> 00:07:02.450
just peripherally set up.

00:07:02.450 --> 00:07:04.540
>> Is actually start to
create our playing field.

00:07:05.910 --> 00:07:08.340
So the first thing we're going
to do is add our ground.

00:07:08.340 --> 00:07:11.460
And our ground is going
to be a 3D plane.

00:07:11.460 --> 00:07:13.120
So I'm going to make a 3D plane.

00:07:14.250 --> 00:07:17.470
So I brought this menu up by
right clicking in the Hierarchy,

00:07:17.470 --> 00:07:20.820
choosing 3D object, and
then I can choose plane.

00:07:20.820 --> 00:07:24.260
I can also bring this menu up
by going to the role create

00:07:24.260 --> 00:07:26.230
button that's
underneath Hierarchy.

00:07:26.230 --> 00:07:28.650
Choosing 3D object and plane.

00:07:28.650 --> 00:07:31.940
And one other way I can do
it is under game object

00:07:31.940 --> 00:07:34.270
up here at the top.

00:07:34.270 --> 00:07:36.020
3D object, plane.

00:07:37.020 --> 00:07:38.990
These are all ways that you
can bring up the same menu.

00:07:40.210 --> 00:07:43.430
I find that right clicking
to be fastest and easiest.

00:07:43.430 --> 00:07:46.350
I'm going to rename plane to
be ground because this is our

00:07:46.350 --> 00:07:48.480
ground and the last thing
I'm going to do for

00:07:48.480 --> 00:07:52.820
it is set scale up over
here in the inspector.

00:07:52.820 --> 00:07:55.300
We see that this thing
is called transform,

00:07:55.300 --> 00:07:57.120
this holds three properties for
us.

00:07:57.120 --> 00:07:59.254
Our position in space,
our rotation,

00:07:59.254 --> 00:08:02.754
current rotation of this object,
and scale, so the size of it.

00:08:02.754 --> 00:08:06.009
I'm gonna change the scale so
that x is 2 and z is 2.

00:08:06.009 --> 00:08:07.129
You can just kind of.

00:08:07.129 --> 00:08:10.333
>> It's important to note
too that, of every game

00:08:10.333 --> 00:08:14.140
object in Unity They all have
the component transform.

00:08:14.140 --> 00:08:16.340
It's the one thing that they
have in common, it's the one

00:08:16.340 --> 00:08:19.770
component that you can guarantee
is on every game object.

00:08:19.770 --> 00:08:23.190
>> Exactly.
And you can just see by changing

00:08:23.190 --> 00:08:25.290
the scale of it,
it just kinda popped it bigger.

00:08:26.410 --> 00:08:29.080
That's gonna be really good
cuz this is our playing field.

00:08:29.080 --> 00:08:31.010
And you can see that I'm
changing perspective

00:08:31.010 --> 00:08:33.660
around in the scene,
the way I'm doing this.

00:08:33.660 --> 00:08:35.220
I hold Alt and

00:08:35.220 --> 00:08:38.180
this kind of changes it to
a little eyeball over here and

00:08:38.180 --> 00:08:41.400
then click and drag to
kinda change perspective.

00:08:41.400 --> 00:08:43.800
You can also do this
by right-click and

00:08:43.800 --> 00:08:47.610
hold and drag, but
I like holding Alt better.

00:08:47.610 --> 00:08:48.410
>> Makes sense.

00:08:48.410 --> 00:08:51.070
I definitely would advise doing
any Unity development with

00:08:51.070 --> 00:08:52.190
a three-button mouse.

00:08:52.190 --> 00:08:55.210
It will make your life a lot,
lot easier.

00:08:55.210 --> 00:08:57.750
>> Especially since you
can zoom in by scrolling.

00:08:57.750 --> 00:08:59.310
>> Yes that is also very handy.

00:09:00.480 --> 00:09:03.200
>> Right, so now that we've
made our ground we should

00:09:03.200 --> 00:09:05.570
probably make the borders
of our arena.

00:09:05.570 --> 00:09:08.560
So we're going to do this by
creating a 3D cube, so I'm going

00:09:08.560 --> 00:09:12.850
to bring up that 3D objects
menu again and choose cube.

00:09:12.850 --> 00:09:13.660
Straight off the bat,

00:09:13.660 --> 00:09:16.380
I'm going to rename it to
something that is not cube.

00:09:16.380 --> 00:09:21.710
Probably left order is very
obvious and straight forward.

00:09:21.710 --> 00:09:24.490
And right now, you can see,
it just popped up but

00:09:24.490 --> 00:09:28.260
I don't see where it is, so I'm
just going to set it to zero,

00:09:28.260 --> 00:09:32.860
zero, zero and right there,
I can see it now, in my scene.

00:09:32.860 --> 00:09:36.040
Any time I lose something I find
it helpful to recenter it by

00:09:36.040 --> 00:09:38.020
changing its origin back to 000.

00:09:38.020 --> 00:09:41.160
>> But it's still a little tiny
dot in the center of that plane,

00:09:41.160 --> 00:09:43.650
it doesn't quite look
like a wall yet.

00:09:43.650 --> 00:09:44.165
>> Yeah.
So

00:09:44.165 --> 00:09:49.365
we probably want to pop it up,
that's a little bit too far,

00:09:49.365 --> 00:09:54.565
but you know what, I think we
can actually stretch it out and

00:09:54.565 --> 00:10:00.194
make it border looking by maybe
changing its scale a little bit.

00:10:00.194 --> 00:10:02.935
Something along
the lines of this.

00:10:02.935 --> 00:10:06.870
See, that looks like a wall.

00:10:06.870 --> 00:10:11.850
So by putting in the values
of scale x, as x being 0.5,

00:10:11.850 --> 00:10:16.526
y being 2, and z being 20.5 you

00:10:16.526 --> 00:10:20.420
can already tell that it just
kind of looks like a wall.

00:10:20.420 --> 00:10:25.040
And I can pop it into place
by changing the x position

00:10:26.460 --> 00:10:27.690
to negative 10.

00:10:27.690 --> 00:10:33.865
Although it just popped over
there on our left side.

00:10:33.865 --> 00:10:35.630
>> Makes sense.

00:10:35.630 --> 00:10:38.500
>> So
I am going to duplicate that.

00:10:38.500 --> 00:10:43.157
That was Ctrl+D or you can just
kind of right-click Duplicate.

00:10:43.157 --> 00:10:47.459
Rename this to be
Right Border and

00:10:47.459 --> 00:10:51.460
change its x position to 10.

00:10:51.460 --> 00:10:53.280
>> Positive 10 as opposed
to negative 10 and

00:10:53.280 --> 00:10:55.060
it's on the opposite side.

00:10:55.060 --> 00:10:58.540
>> Yeah, automatically like
that, that was convenient.

00:10:58.540 --> 00:11:02.040
I'm going to duplicate it
one more time near border.

00:11:04.950 --> 00:11:06.000
Let's change this back to zero.

00:11:06.000 --> 00:11:08.032
So now let's pop
back in the middle. Let's-

00:11:08.032 --> 00:11:09.215
>> But now we gotta change that

00:11:09.215 --> 00:11:09.940
scale, right?

00:11:09.940 --> 00:11:11.866
So it's stretched the other way.

00:11:11.866 --> 00:11:12.449
>> Exactly.

00:11:12.449 --> 00:11:17.907
So we just switch these
two values 20.5, 0.5.

00:11:17.907 --> 00:11:19.260
There we go.

00:11:19.260 --> 00:11:23.780
We can change its
position negative 10.

00:11:23.780 --> 00:11:25.890
Right here we change
the z instead of the x.

00:11:27.110 --> 00:11:29.730
Then I bet you guys can
guess our far border

00:11:31.640 --> 00:11:36.000
is going to change
to positive 10.

00:11:36.000 --> 00:11:38.540
And right now in our scene
view we can see that we have

00:11:38.540 --> 00:11:40.500
a beautiful-looking arena.

00:11:40.500 --> 00:11:42.730
>> Awesome,
that looks great and safe.

00:11:42.730 --> 00:11:44.117
>> Yeah.

00:11:44.117 --> 00:11:46.220
They won't fall
out of this arena.

00:11:46.220 --> 00:11:49.320
But if you can see it in our
hierarchy over here on the left,

00:11:49.320 --> 00:11:50.910
this will get
a little cluttered,

00:11:50.910 --> 00:11:53.670
it would be really nice if we
could just kind of like group

00:11:53.670 --> 00:11:58.020
all of our borders in one place,
so I'm going to do exactly that.

00:11:58.020 --> 00:12:00.170
I'm going to create
an Empty Game Object,

00:12:00.170 --> 00:12:03.060
it's right above 3D Object,
Create Empty.

00:12:04.300 --> 00:12:07.463
I'm going to name this Object
Borders, I'm going to make

00:12:07.463 --> 00:12:10.303
sure that its position is
just kind of set to 0, 0,

00:12:10.303 --> 00:12:13.032
0, because this thing
isn't really anything.

00:12:13.032 --> 00:12:16.009
And I'm going to group all of
these borders together and

00:12:16.009 --> 00:12:18.730
drag them on top of where
our Empty Game Object is and

00:12:18.730 --> 00:12:20.390
you can see it is highlighted.

00:12:21.590 --> 00:12:24.350
And then when I drop them,
it creates this drop down menu.

00:12:24.350 --> 00:12:25.780
>> Awesome.
You zoom in on that,

00:12:25.780 --> 00:12:28.720
it basically shows that
game objects can be treated

00:12:28.720 --> 00:12:31.060
in a sense, kinda like folders.

00:12:31.060 --> 00:12:32.520
They can have sub objects and

00:12:32.520 --> 00:12:36.140
so you can organize them
together by type, stuff that

00:12:36.140 --> 00:12:38.830
when you want it to move,
you want it to move together.

00:12:38.830 --> 00:12:40.450
And so
you can clear up your hierarchy.

00:12:42.860 --> 00:12:44.480
>> Yeah,
I find it very convenient.

00:12:46.330 --> 00:12:49.020
So the next thing we're going to
want to do is actually be able

00:12:49.020 --> 00:12:52.250
to distinguish this gray object
from other gray objects cuz our

00:12:52.250 --> 00:12:56.110
arena just looks gray and
sad and boring.

00:12:56.110 --> 00:12:58.780
So in the our assets we
have our Scenes folder.

00:12:58.780 --> 00:13:03.189
I'm gonna create a new
folder named Materials.

00:13:06.030 --> 00:13:07.730
Bet you guys can guess what
we're gonna create in our

00:13:07.730 --> 00:13:09.110
Materials folder.

00:13:09.110 --> 00:13:10.220
>> Nice materials.

00:13:11.240 --> 00:13:12.640
>> Well, okay materials.

00:13:12.640 --> 00:13:16.710
>> [LAUGH] So what exactly
is a material in Unity?

00:13:17.770 --> 00:13:23.282
>> So
material is a very useful thing.

00:13:23.282 --> 00:13:26.519
If you ever want to
decorate your 3D objects,

00:13:26.519 --> 00:13:29.922
in this case we're going
to just give it a color so

00:13:29.922 --> 00:13:32.910
our 3D objects will
all just be one color.

00:13:32.910 --> 00:13:34.860
But if you ever have
like an image or

00:13:34.860 --> 00:13:39.070
a picture or like a texture of
some sort you can just kind of

00:13:39.070 --> 00:13:44.200
create a picture of this and
then drag it onto this game,

00:13:44.200 --> 00:13:49.990
your 3D game object and it
will then texture your object.

00:13:49.990 --> 00:13:53.340
>> Yeah so you can bring in how
you want the light to interact,

00:13:53.340 --> 00:13:57.160
what texture you're using,
and bring it all together to

00:13:57.160 --> 00:14:00.460
tell the computer how you want
this 3D object to be displayed.

00:14:00.460 --> 00:14:03.800
Since there's more than one
way an object can be rendered.

00:14:03.800 --> 00:14:05.380
Is it really shiny?

00:14:05.380 --> 00:14:06.410
Is it really glossy?

00:14:06.410 --> 00:14:07.943
Do you have bump maps on it so

00:14:07.943 --> 00:14:11.110
that the shadows interact
in a different way?

00:14:11.110 --> 00:14:13.420
But that's all stuff for
a more advanced lecture,

00:14:13.420 --> 00:14:16.120
right now we are going to
just make it a pretty color.

00:14:16.120 --> 00:14:18.950
>> I'll show you guys were some
of these settings lie once we

00:14:18.950 --> 00:14:22.200
actually create our material.

00:14:22.200 --> 00:14:25.895
If you look, I brought up
the menu by right-clicking,

00:14:25.895 --> 00:14:29.390
Create, and instead of folder
were going to scroll down

00:14:29.390 --> 00:14:30.596
to where it says Material.

00:14:30.596 --> 00:14:34.950
You can kind of take my word
that that was Material.

00:14:34.950 --> 00:14:39.220
New material is going
to be Ground Material,

00:14:39.220 --> 00:14:40.750
probably our material for
the ground.

00:14:40.750 --> 00:14:45.380
I'm gonna create another
New material and

00:14:45.380 --> 00:14:49.339
I'm going to name this one
Collectible Material, for our

00:14:49.339 --> 00:14:53.630
collectibles that we are going
to be collecting in this game.

00:14:53.630 --> 00:14:57.660
So, now we need to assign it a
color and we do this by when you

00:14:57.660 --> 00:15:00.600
click on it, in our inspector,
this menu pops up.

00:15:02.380 --> 00:15:04.520
And over here, there's like
a little color selector

00:15:05.710 --> 00:15:08.650
if you click on it,
it brings up a color selector.

00:15:08.650 --> 00:15:10.010
>> That's handy.

00:15:10.010 --> 00:15:11.070
>> I know.

00:15:11.070 --> 00:15:13.640
I'm going to make my
ground material blue.

00:15:13.640 --> 00:15:17.750
And then my collectible
material I'll make green.

00:15:21.510 --> 00:15:23.700
So now,
here's the toughest part.

00:15:23.700 --> 00:15:25.040
You guys have to
watch carefully here.

00:15:26.330 --> 00:15:29.250
As we drag our ground
material into our scene.

00:15:30.680 --> 00:15:31.240
There we go.

00:15:31.240 --> 00:15:33.390
It gives me the option.

00:15:34.930 --> 00:15:36.390
>> And
it knows automatically what

00:15:36.390 --> 00:15:38.060
object you're hovering
that material over and

00:15:38.060 --> 00:15:41.260
it says, you wanna apply this
material to that object.

00:15:41.260 --> 00:15:42.620
>> Exactly.
So if I drag and

00:15:42.620 --> 00:15:48.010
drop it onto our plane right
here, click on Ground,

00:15:48.010 --> 00:15:51.730
and now our material is
now ground material.

00:15:51.730 --> 00:15:53.550
>> Can you zoom in on that?

00:15:53.550 --> 00:15:56.800
Yes I can.
>> You can totally set that

00:15:56.800 --> 00:15:59.200
in the inspector by just
adding the material and

00:15:59.200 --> 00:16:01.710
choosing the one we just did,
but this is a little shortcut,

00:16:01.710 --> 00:16:05.320
in the same way right-clicking
the is a little shortcut

00:16:05.320 --> 00:16:08.730
to making it in the game object.

00:16:08.730 --> 00:16:12.490
>> Some of the Settings
that Tobio and

00:16:12.490 --> 00:16:15.560
I were talking about before
you can kinda see once

00:16:15.560 --> 00:16:17.330
you click this drop
down menu here.

00:16:19.590 --> 00:16:20.090
>> Excellent.

00:16:22.040 --> 00:16:27.430
>> Awesome, so now we have
created our playing field.

00:16:27.430 --> 00:16:29.940
>> There's not really
much to do here.

00:16:29.940 --> 00:16:32.840
The last thing we're going to
do, just to make sure that

00:16:32.840 --> 00:16:37.020
everything is setup correctly, I
changed my directional lighting

00:16:37.020 --> 00:16:43.400
just, make sure that
my rotation is x 50,

00:16:43.400 --> 00:16:46.490
y 60 just because the delay that
it ends up lighting are seen.

00:16:46.490 --> 00:16:47.640
>> Yes, cuz it looks nicer.

00:16:47.640 --> 00:16:50.156
But something of course
you can tweak on your own.

00:16:50.156 --> 00:16:53.790
>> Feel free to play
around with these values.

00:16:53.790 --> 00:16:55.730
So the next thing we're going
to do is actually create our

00:16:55.730 --> 00:16:56.940
collectible.

00:16:56.940 --> 00:16:59.660
We are going to do this
by right-clicking and

00:16:59.660 --> 00:17:01.880
creating another cube.

00:17:01.880 --> 00:17:02.990
3D Object > Cube.

00:17:05.690 --> 00:17:07.940
I'm going to rename this cube,
Collectible.

00:17:09.740 --> 00:17:11.240
That does not say collectible.

00:17:12.570 --> 00:17:13.080
Not this.

00:17:14.508 --> 00:17:16.660
So our collectible is now
invisible on our field,

00:17:16.660 --> 00:17:21.090
if I reset its origin point,
it now you can actually see it.

00:17:21.090 --> 00:17:22.150
It pops into view.

00:17:22.150 --> 00:17:23.756
>> You can also reset it, but

00:17:23.756 --> 00:17:27.406
instead of having to manually
go in and type zero zero zero,

00:17:27.406 --> 00:17:30.326
there's a little gear
next to that component,

00:17:30.326 --> 00:17:33.406
in the editor and you can
click that and hit Reset.

00:17:33.406 --> 00:17:35.657
It'll automatically zero
everything out for you.

00:17:35.657 --> 00:17:41.282
>> Yeah, pretty much.

00:17:41.282 --> 00:17:44.311
So right now it's just kind
of just sitting in the middle

00:17:44.311 --> 00:17:46.888
of our field, I'm just
gonna raise it up a bit so

00:17:46.888 --> 00:17:49.520
we can see if we zoom
in our scene view.

00:17:49.520 --> 00:17:52.610
It's kinda hovering
over our ground

00:17:52.610 --> 00:17:55.240
instead of being in our ground.

00:17:55.240 --> 00:17:59.992
And I'm just going to change
its rotation to 45, 45, 45.

00:17:59.992 --> 00:18:01.954
And you can see
in our game view,

00:18:01.954 --> 00:18:04.150
that looks much
more collectibly.

00:18:05.920 --> 00:18:08.700
>> Which reminds me of those
collectibles in Mario Kart 64

00:18:08.700 --> 00:18:12.800
but I might have played that
at a very impressionable age.

00:18:12.800 --> 00:18:15.790
Well I don't know, I think
those Mario Kart collectibles

00:18:15.790 --> 00:18:19.050
are just very, they just
like scream collect me.

00:18:19.050 --> 00:18:21.770
So that's the impression we are
going to want to give as well.

00:18:21.770 --> 00:18:25.160
>> Nice simple shape but

00:18:25.160 --> 00:18:27.350
shows something cool
is going on there.

00:18:27.350 --> 00:18:28.925
>> Also if you haven't
saved yet, please save.

00:18:28.925 --> 00:18:29.660
>> Yes.

00:18:29.660 --> 00:18:32.140
Hit Ctrl+S often.

00:18:32.140 --> 00:18:36.056
Yes, so in our assets we
have Materials, Scenes,

00:18:36.056 --> 00:18:40.531
now we're going to create
a third folder called Scripts.

00:18:43.532 --> 00:18:45.990
>> This is where we're gonna
put some code in, right?

00:18:45.990 --> 00:18:49.680
>> Right, exactly, we are going
to write our first bit of code.

00:18:49.680 --> 00:18:53.010
And we're going to do this
in our Scripts folder.

00:18:53.010 --> 00:18:57.450
We are going to Create
> New C Sharp script.

00:18:57.450 --> 00:19:02.080
Right here, second option
in my Unity editor.

00:19:02.080 --> 00:19:06.210
I am going to name this
script ItemRotator.

00:19:06.210 --> 00:19:12.520
And you can see once I zoom in,
I have camel cased it.

00:19:13.660 --> 00:19:17.290
Which means that
the beginning of each word

00:19:17.290 --> 00:19:20.230
has a capital letter to be
able to distinguish it.

00:19:20.230 --> 00:19:23.748
Item with a capital I,
Rotator with a capital R.

00:19:23.748 --> 00:19:28.610
If I double-click this
script right now it's

00:19:28.610 --> 00:19:32.930
going open in My Favorite
Editor, which in this case,

00:19:32.930 --> 00:19:35.330
by default,
is set to Visual Studio.

00:19:35.330 --> 00:19:37.530
Turns out that's also
my favorite editor.

00:19:37.530 --> 00:19:39.310
If you're using a Mac,

00:19:39.310 --> 00:19:42.604
it's probably going
to open Mono Develop.

00:19:42.604 --> 00:19:47.248
It will behave very similarly so
you'll be able to write the code

00:19:47.248 --> 00:19:51.032
in the same way because you'll
be able to see the same

00:19:51.032 --> 00:19:54.479
thing pop up on Mono Develop and
Visual Studio.

00:19:54.479 --> 00:19:57.884
And you could also use
the visual studio code,

00:19:57.884 --> 00:20:01.800
our light weight editor on
a Mac or Windows as well.

00:20:01.800 --> 00:20:03.820
But it requires a little
bit of extra work,

00:20:03.820 --> 00:20:08.080
but again that is not
the scope of this talk.

00:20:08.080 --> 00:20:12.050
>> Right, so right now by
default, whenever we create

00:20:12.050 --> 00:20:15.660
a new C# Script, this is what
it automatically generates.

00:20:15.660 --> 00:20:18.830
Using UnityEngine,
using System.Collections,

00:20:18.830 --> 00:20:21.800
public class,
whatever you named your script,

00:20:21.800 --> 00:20:26.160
extends MonoBehavior,
start function, update function.

00:20:26.160 --> 00:20:28.640
>> It's important to note
that it makes it based on

00:20:28.640 --> 00:20:31.370
what you first named the script
and often I see people who

00:20:31.370 --> 00:20:34.460
are new to Unity will
make a C# Script, and

00:20:34.460 --> 00:20:36.860
just kind of like as you were
typing earlier, I had a typo.

00:20:36.860 --> 00:20:40.040
Let me just rename that file and
fix that, but then they don't

00:20:40.040 --> 00:20:44.250
actually rename the typo and the
script file that was created,

00:20:44.250 --> 00:20:46.450
and the class is a different
name than the filename.

00:20:46.450 --> 00:20:49.411
And so it's important to
double-check that those two

00:20:49.411 --> 00:20:50.190
names match.

00:20:50.190 --> 00:20:52.560
Whatever they are,
they should match.

00:20:52.560 --> 00:20:53.530
>> Yep, definitely.

00:20:54.790 --> 00:20:59.642
As you can see up here,
if I had kind of named it

00:20:59.642 --> 00:21:05.130
something wrong, and
then try to edit it back

00:21:05.130 --> 00:21:09.190
in the Unity editor, this would
have still said ItemRotator.

00:21:09.190 --> 00:21:10.135
It wouldn't have updated.

00:21:10.135 --> 00:21:13.807
So you would have to update that
yourself to make sure that it's

00:21:13.807 --> 00:21:14.648
consistent.

00:21:14.648 --> 00:21:15.503
>> Kind of a tangent,

00:21:15.503 --> 00:21:17.641
but it is a common question
I get with people, so

00:21:17.641 --> 00:21:18.795
I wanted to point it out.

00:21:18.795 --> 00:21:21.040
>> Yep.

00:21:21.040 --> 00:21:24.000
So as this
Start Function anything

00:21:24.000 --> 00:21:25.680
that needs to be initialized, or

00:21:25.680 --> 00:21:28.610
anything that you would want to
happen at the start of the game

00:21:28.610 --> 00:21:30.230
will go in here.

00:21:30.230 --> 00:21:33.430
An update is called
Once Per Frame.

00:21:33.430 --> 00:21:37.640
Which means that at every
frame this code will execute.

00:21:37.640 --> 00:21:40.700
Now, it's kind of important
that we distinguish frame

00:21:40.700 --> 00:21:42.260
versus time.

00:21:42.260 --> 00:21:48.470
So frame rate will differ
depending on what computer

00:21:48.470 --> 00:21:51.640
you're on or the settings of
how you're running your game.

00:21:51.640 --> 00:21:54.302
It's not really consistent
across machines however,

00:21:54.302 --> 00:21:56.120
time is a universal constant.

00:21:56.120 --> 00:22:00.600
So, if you ever want to have
something like movement,

00:22:00.600 --> 00:22:04.540
lets say, movement probably
should not be updated per frame,

00:22:04.540 --> 00:22:06.945
but rather based on time.

00:22:06.945 --> 00:22:08.266
>> Mm-hmm.
>> Because otherwise

00:22:08.266 --> 00:22:10.080
you're gonna have
blocky movement.

00:22:10.080 --> 00:22:12.752
>> Now, you still might want
to have that in your update

00:22:12.752 --> 00:22:15.363
code but you just will then
have to factor in how much

00:22:15.363 --> 00:22:17.260
time has passed.

00:22:17.260 --> 00:22:18.360
>> Exactly.

00:22:18.360 --> 00:22:23.548
So right now we are going to add
one line of code under update.

00:22:26.697 --> 00:22:31.718
And it is going to be transform
with the lowercase t,

00:22:31.718 --> 00:22:35.141
dot rotate with an uppercase R,
and

00:22:35.141 --> 00:22:39.834
then in parenthesis new
Vector with a capital V.

00:22:39.834 --> 00:22:41.690
V Vector 3.

00:22:42.970 --> 00:22:49.070
And then in those parentheses,
15, 30, 45.

00:22:49.070 --> 00:22:53.365
Outside those parentheses,
star, which means multiply,

00:22:53.365 --> 00:22:57.932
times time dot delta time.

00:23:00.117 --> 00:23:01.640
>> Excellent.

00:23:01.640 --> 00:23:03.480
What is delta time Medina?

00:23:03.480 --> 00:23:04.410
>> Yeah, what did I just write?

00:23:04.410 --> 00:23:06.400
Let's break this
down really quickly.

00:23:06.400 --> 00:23:09.680
First off, save and you can see
Visual Studio tells me that I've

00:23:09.680 --> 00:23:11.750
saved because this
jumps to green.

00:23:13.270 --> 00:23:16.720
So let's break down this
line of code right here.

00:23:16.720 --> 00:23:19.990
Transform which as you recall,
when we were looking

00:23:19.990 --> 00:23:23.670
at the inspector, our transform
has three different properties.

00:23:23.670 --> 00:23:28.010
Our transform has position,
rotation, and scale.

00:23:28.010 --> 00:23:31.220
So transform.Rotate is probably
going to change it's rotation.

00:23:32.720 --> 00:23:33.850
>> Makes sense.

00:23:33.850 --> 00:23:38.798
>> Our Vector 3 which I very
just poorly highlighted has our

00:23:38.798 --> 00:23:40.930
X, Y, and Z values.

00:23:40.930 --> 00:23:45.065
X being 15, Y,
being 30, Z being 45.

00:23:45.065 --> 00:23:47.970
>> Mm-hm, it's just a collection
of those three numbers just like

00:23:47.970 --> 00:23:51.560
in math as a three dimensional
vector for how we're going

00:23:51.560 --> 00:23:54.550
to rotate it in 3D space
>> Exactly,

00:23:54.550 --> 00:23:57.768
now why are we multiplying
it times time.deltaTime?

00:23:57.768 --> 00:24:00.950
Well time.deltaTime actually,
if you hover over it in

00:24:00.950 --> 00:24:03.970
Visual Studio, it'll-
>> That's some nice

00:24:03.970 --> 00:24:05.710
IntelliSense highlighting.

00:24:05.710 --> 00:24:07.480
>> Yeah, IntelliSense
highlighting will actually tell

00:24:07.480 --> 00:24:09.390
you straight up right here

00:24:09.390 --> 00:24:12.660
the time in seconds it took
to complete the last frame.

00:24:12.660 --> 00:24:13.710
Well that's really convenient.

00:24:13.710 --> 00:24:15.850
That means I don't have to
calculate between frame rates

00:24:15.850 --> 00:24:16.930
all by myself.

00:24:16.930 --> 00:24:18.390
Thanks Unity.

00:24:18.390 --> 00:24:19.230
>> Automatically handles that.

00:24:19.230 --> 00:24:20.270
That's great.

00:24:20.270 --> 00:24:23.831
>> Great, so now we are rotating
it not based per frame but

00:24:23.831 --> 00:24:25.155
actually per time.

00:24:28.162 --> 00:24:32.308
So now if we go back to our
Unity editor, you can actually

00:24:32.308 --> 00:24:37.074
click on item rotator and in the
inspector it'll pop up that your

00:24:37.074 --> 00:24:41.720
code has changed and now we have
our newly added line of code.

00:24:41.720 --> 00:24:43.590
>> Mm-hm, in real time.

00:24:43.590 --> 00:24:44.190
>> In real time.

00:24:45.880 --> 00:24:50.180
If you don't see that in real
time you might want to refresh

00:24:50.180 --> 00:24:54.090
over here I right-clicked, and
where we have Create, Refresh.

00:24:54.090 --> 00:24:56.720
>> And also make sure it saved
into Visual Studio, because I've

00:24:56.720 --> 00:24:59.470
often had that where I'm like,
wait, why didn't my code work?

00:24:59.470 --> 00:25:01.050
Yeah, I forgot to save.

00:25:01.050 --> 00:25:02.140
>> Right.

00:25:02.140 --> 00:25:06.290
So now we can drag item
rotator onto collectible.

00:25:06.290 --> 00:25:09.106
>> So just like with the
material that you just drag and

00:25:09.106 --> 00:25:11.202
drop onto the hierarchy
at this time,

00:25:11.202 --> 00:25:14.415
and it'll create a new component
onto that game object.

00:25:14.415 --> 00:25:16.950
>> Right, and if you click
on it in the inspector

00:25:16.950 --> 00:25:19.186
item rotator should
now be on there.

00:25:19.186 --> 00:25:20.840
>> Excellent.

00:25:20.840 --> 00:25:21.580
>> If we click play.

00:25:23.820 --> 00:25:24.806
Look at that, it's rotating.

00:25:24.806 --> 00:25:28.325
>> It's rotating the 3D,
that's great.

00:25:28.325 --> 00:25:28.876
>> Great.

00:25:30.160 --> 00:25:31.210
>> It's exactly what we wanted.

00:25:31.210 --> 00:25:33.140
Always good when the code
works first time.

00:25:33.140 --> 00:25:34.720
>> I know.

00:25:35.830 --> 00:25:39.970
So there's gonna be one more
thing that I do real quick.

00:25:39.970 --> 00:25:42.620
And that is, remember when we
made that collectible material?

00:25:42.620 --> 00:25:44.940
>> Mm-hm.
>> I made mine green.

00:25:44.940 --> 00:25:47.500
So if I drag it onto
collectible, now it's green.

00:25:47.500 --> 00:25:48.040
>> There we go.

00:25:49.160 --> 00:25:50.830
>> Cool.
>> Now it rotates and

00:25:50.830 --> 00:25:52.110
it looks pretty.

00:25:52.110 --> 00:25:53.640
>> I know, it's really great.

00:25:53.640 --> 00:25:56.140
It's almost feels like
we're making a game here.

00:25:56.140 --> 00:26:01.308
>> Almost.
>> Almost, so real quick.

00:26:01.308 --> 00:26:04.900
We're going to make
our game we just made,

00:26:04.900 --> 00:26:07.660
as you saw one screen kind of
popped up when I pressed play.

00:26:07.660 --> 00:26:10.070
Now we're going to
make it look like VR

00:26:10.070 --> 00:26:12.370
where it projects into each eye.

00:26:12.370 --> 00:26:13.570
>> Excellent.

00:26:13.570 --> 00:26:16.940
>> Awesome, so the first step
to making it VR capable is

00:26:16.940 --> 00:26:18.620
delete your main camera.

00:26:18.620 --> 00:26:20.510
>> No, why are we deleting that?

00:26:20.510 --> 00:26:22.480
Don't we need it?
>> Because, yeah we do need it.

00:26:22.480 --> 00:26:23.890
But we don't need that one.

00:26:23.890 --> 00:26:28.020
Actually, we need a special
Google Cardboard camera, which

00:26:28.020 --> 00:26:32.320
under our Cardboard assets, and
under a folder called Prefabs,

00:26:33.500 --> 00:26:36.850
there's going to be a special
prefab called CardboardMain.

00:26:36.850 --> 00:26:39.150
>> And this is the stuff that we
imported back in the beginning

00:26:39.150 --> 00:26:40.550
of the project.

00:26:40.550 --> 00:26:44.010
>> Right, so if we drive
CardboardMain into our scene.

00:26:44.010 --> 00:26:47.360
You kinda see a new
camera's here.

00:26:47.360 --> 00:26:50.160
>> And this one's special
because there are technically

00:26:50.160 --> 00:26:51.430
two cameras attached to it.

00:26:51.430 --> 00:26:53.850
One for the left eye, and
one for the right eye.

00:26:53.850 --> 00:26:56.250
>> You can't see that right
now but if you actually,

00:26:56.250 --> 00:27:00.460
in the hierarchy kind of drop
down all of the drop down menus,

00:27:00.460 --> 00:27:04.130
you can kind of see
under main camera.

00:27:04.130 --> 00:27:05.870
You have a main camera left and

00:27:05.870 --> 00:27:09.890
a main camera right, one for
each eye under cardboard main.

00:27:11.400 --> 00:27:19.415
Cool, now if we press play
>> That looks very 3D.

00:27:19.415 --> 00:27:22.414
>> Yes, but right now you can
see it's projecting into each

00:27:22.414 --> 00:27:25.286
eye and the camera is now
separated into the left eye and

00:27:25.286 --> 00:27:27.110
the right eye.

00:27:27.110 --> 00:27:28.690
>> Which of course looks
a little weird on your

00:27:28.690 --> 00:27:30.140
computer screen.

00:27:30.140 --> 00:27:31.650
>> Right.
>> It's also worth noting

00:27:31.650 --> 00:27:36.240
the concept of a prefab in Unity
which is a collection of game

00:27:36.240 --> 00:27:41.170
objects components, property
values that you can save as

00:27:41.170 --> 00:27:46.830
a file to then store in your
editor and as you've seen here,

00:27:46.830 --> 00:27:49.970
that Google already ahead
of time made these cameras,

00:27:49.970 --> 00:27:52.090
set it up just perfect for
their settings, and

00:27:52.090 --> 00:27:54.801
then we got that file that we
can drag back into our scene.

00:27:54.801 --> 00:27:58.364
>> Tufia,
I was going to get there.

00:27:58.364 --> 00:28:00.146
>> Stepping on you.
>> This pre-fab is like

00:28:00.146 --> 00:28:04.094
a template, a template that's
very useful if you're creating

00:28:04.094 --> 00:28:06.300
multiple kinds of
the same object.

00:28:06.300 --> 00:28:08.850
Which in our game, we're
gonna have probably multiple

00:28:08.850 --> 00:28:11.730
collectibles so
we're probably not going to want

00:28:11.730 --> 00:28:14.320
to have one game object over
here that's collectible.

00:28:14.320 --> 00:28:16.870
We're going to want to
have multiple templates of

00:28:16.870 --> 00:28:20.250
collectibles once we
add more scripts and

00:28:20.250 --> 00:28:22.270
more properties to them.

00:28:22.270 --> 00:28:24.720
But we'll handle that in a bit.

00:28:24.720 --> 00:28:26.600
Right now we're not quite
done with our main camera.

00:28:27.910 --> 00:28:31.050
So right now, if you select
the main camera under cardboard

00:28:31.050 --> 00:28:34.980
main, scroll down, there's
a component that we have to

00:28:34.980 --> 00:28:38.070
add under Add Component,
all the way at the bottom.

00:28:39.800 --> 00:28:41.580
I'm going to click that.

00:28:41.580 --> 00:28:46.810
And in the search bar,
PHY physics ray caster.

00:28:48.370 --> 00:28:50.280
Not the 2D one,
there's a 3D one.

00:28:52.050 --> 00:28:54.090
The regular old,
physics ray caster.

00:28:55.510 --> 00:28:58.540
And essentially,
what this is doing is

00:28:58.540 --> 00:29:02.170
you guys remember from geometry,
a ray is a line.

00:29:02.170 --> 00:29:04.660
So this is essentially

00:29:04.660 --> 00:29:09.420
going to invisibly point
a line at any 3D object.

00:29:09.420 --> 00:29:12.430
It can tell us whether or
not we're interacting with that.

00:29:12.430 --> 00:29:15.010
So it's a difference between
our camera just kind of looking

00:29:15.010 --> 00:29:19.990
around in space versus am
I touching this 3D object,

00:29:19.990 --> 00:29:21.740
am I touching it?

00:29:21.740 --> 00:29:22.380
Yes I am.

00:29:22.380 --> 00:29:25.100
>> Touching it based on
the direction that your

00:29:25.100 --> 00:29:26.490
eye is facing.

00:29:26.490 --> 00:29:27.090
>> Right, so

00:29:27.090 --> 00:29:29.406
it's almost like there's a line
shooting out from our camera.

00:29:29.406 --> 00:29:31.448
>> Makes sense.

00:29:31.448 --> 00:29:34.860
>> Yep, and there's one more
thing that we have to do.

00:29:37.150 --> 00:29:41.160
In cardboard prefabs where we
found cardboard main, there's

00:29:41.160 --> 00:29:45.130
one folder which, in my editor,
is at the top, called UI.

00:29:46.200 --> 00:29:48.900
If we double click on that,
there is one prefab that is

00:29:48.900 --> 00:29:52.000
in this folder, all alone,
called cardboard reticule.

00:29:53.800 --> 00:29:56.060
And I will show you what
a cardboard reticule is,

00:29:56.060 --> 00:29:58.720
real quick, but
first we have to drag it and

00:29:58.720 --> 00:30:01.010
parent it under our main camera.

00:30:02.070 --> 00:30:05.740
So, what it should look
like is Main Camera.

00:30:08.290 --> 00:30:11.356
And then, it should have
three things underneath it.

00:30:11.356 --> 00:30:15.420
Our Main Camera Left,
our Main Camera Right, and

00:30:15.420 --> 00:30:17.330
our CardboardReticle.

00:30:17.330 --> 00:30:21.030
And a reticle in VR
essentially helps us

00:30:21.030 --> 00:30:23.650
figure out what
we're looking at.

00:30:23.650 --> 00:30:25.080
And with paired with
the ray caster,

00:30:25.080 --> 00:30:28.760
it can kind of tell us, are we
looking at this 3D object?

00:30:29.860 --> 00:30:30.440
Yes, no?

00:30:33.500 --> 00:30:37.060
So this appears on,
let me play our scene,

00:30:37.060 --> 00:30:40.170
this white dot that's now in
the middle of our camera.

00:30:41.810 --> 00:30:43.510
And after we attach
more scripts and

00:30:43.510 --> 00:30:47.910
more fun stuff, it'll actually
expand when we're looking at

00:30:47.910 --> 00:30:49.570
a 3D object that we
can interact with.

00:30:51.300 --> 00:30:51.828
Isn't that fun?

00:30:51.828 --> 00:30:54.854
>> Sounds great.

00:30:54.854 --> 00:30:57.870
>> So, last thing right
now in our game view.

00:30:57.870 --> 00:30:59.540
See, this is why I like
having the game view.

00:30:59.540 --> 00:31:03.710
We can kind of tell this
is not really set up so

00:31:03.710 --> 00:31:05.540
that's fun to play our game.

00:31:05.540 --> 00:31:08.590
I'm going to reposition
my camera so

00:31:08.590 --> 00:31:13.010
that we can actually
kind of see our scene.

00:31:13.010 --> 00:31:14.500
>> As opposed to being in
the middle of it we're

00:31:14.500 --> 00:31:16.480
kind of looking down at it.

00:31:16.480 --> 00:31:19.480
>> Right, cuz it kind of
added it at zero zero zero.

00:31:19.480 --> 00:31:25.637
But it took me a while to play
around with these values and

00:31:25.637 --> 00:31:29.960
you can feel free to
put in your own, but

00:31:29.960 --> 00:31:35.988
I over here in the inspector
set our position to be X 0,

00:31:35.988 --> 00:31:40.460
Y 11,
Z -16 with a 45 X rotation.

00:31:41.770 --> 00:31:46.030
And it kind of, I think it
makes it look good in our game.

00:31:47.400 --> 00:31:48.200
Sounds good to me.

00:31:48.200 --> 00:31:52.750
>> And this is actually going
to be the end of part 1.

00:31:52.750 --> 00:31:56.346
We have set up our scene and
made it VR capable,

00:31:56.346 --> 00:32:00.415
put the beginnings of
the collectible in our scene.

00:32:00.415 --> 00:32:04.067
We're going to add in part two,
you will see that we will

00:32:04.067 --> 00:32:07.181
actually make our
collectible collectively,

00:32:07.181 --> 00:32:10.135
as well as add a game
controller that will keep

00:32:10.135 --> 00:32:13.410
track of our score and
a you win bit of text.

00:32:13.410 --> 00:32:14.290
>> Awesome, great.

00:32:14.290 --> 00:32:16.567
>> Well, then we'll see
you all in part two.

