Game Development Reference
In-Depth Information
6. Next, we will click on the
Floor
object in the
Hierarchy
view and add
Box Col-
lider 2D
by going to
Component
|
Physics2D
|
Box Collider 2D
. Then, we will
go to
Inspector
and set the values of the attributes as follows:
Tag
Ground
Layer
Ground
Transform
Position
X
:
0
,
Y
:
-9.2
, and
Z
:
0
Scale
X
:
5
,
Y
:
5
, and
Z
:
1
Sprite Renderer
Order in Layer
2
Box Collider 2D
Material
Ground
(drag the Physics2D Material here)