Game Development Reference
In-Depth Information
Classified intel
In this step, we have also applied the
Rock
physics material to the
Box Collider
material in
the cube. We can apply friction and bounciness values to each object of the
Box Collider
material to get a realistic reaction while calculating the physics.
For the
Rock
physics material, we go to the
Resources/Physics Materials
folder
in the
Project
view, and then click on the
Rock
physics material object to bring up its
In-
spector
view. We will see to it that we have set the
Dynamic Friction
value to
0.3
and
Static Friction
to
0.3
, which will make each piece slow down when it collides with an-
other. This way, we can make the rock be not too slippery or too hard to move. Also, the
rock should not bounce at all. So, we set the
Bounciness
value to
0
, as shown in the fol-
lowing screenshot:
For more details on each property, visit the following URL: