Game Development Reference
In-Depth Information
20. Then, we need the transition arrow from
Jump
to
Fall
and set up its
Inspector
view by setting its
Conditions
view to
Fall
.
21. The current
Animator
view will look similar to the following screenshot:
22. Finally, we will need to attach
Rigidbody 2D
and
Box Collider 2D
to our
Player
game object. Let's go back to the
Hierarchy
view, click on the
Player
game ob-
ject, go to
Component
|
Physics 2D
|
Rigidbody 2D
to add
Rigidbody 2D
, go to
Component
|
Physics 2D
|
Box Collider 2D
to add
Box Collider 2D
, and then
set up
Inspector
as follows:
Rididbody 2D
Fixed Angle
Check the box
Interpolate
Interpolate
Box Collider 2D
Material
Player
(drag the Physics2D Material here)