Game Development Reference
In-Depth Information
3. Next, we will go to the cube
Inspector
view to set up the parameters as follows:
F
Tag
:
Destructible
F
Transform
Position
:
X: 3
Y: 23.5
Z: 0
Rotation
:
X: 0
Y: 0
Z: 0
Scale
:
X: 6
Y: 6
Z: 1
F
Box Collider
Material
:
Rock
(Drag
Rock
physics material in the
Chapter7
folder
to
Project
view here)
F
Mesh Renderer
Materials
:
Size
:
1
Element 0
:
Rock
(Drag
Rock
material in the
Chapter7
folder to
Project
view here)
F
Rigidbody
Mass
:
100
Is Kinematic
:
Check
4. Now we have inished seing up the irst cube. Let's duplicate three more cubes by
pressing
Command + D
(for Mac), or
Control + D
(for Windows) and name all three
Cube2
,
Cube3
, and
Cube4
, as shown in the following screenshot:
5. Then, we go to each new cube's
Inspector
view and set up its transform posiion
as follows:
F
Transform (Cube2)
Position
:
X: 3
Y: 29.5
Z: 0
F
Transform (Cube3)
Position
:
X: -3
Y: 29.5
Z: 0