Game Development Reference
In-Depth Information
Game over-Wrapping it up
In this chapter, we have learned how to set up the animaion from a 3D model and we also
learned a bit about how to export the model with animaion from 3D Studio Max to use
in Unity. Then, we used the
CharacterController
script to our character and added
the built-in
Third-person Controller
and
Third-person Camera
to apply it to our
character and make it move.
Next, we created our
CharacterControl
script to control our character and add the fall
animaion that we want to use for our character. We also learned how to use the
Move()
funcion in the
CharacterController
script, and how to speed up or slow down the
animaion clip by seing the speed of the clip. We also learned how to use
Animation.
crossFade()
to cross fade the current animaion to another, giving animaion clip. Lastly,
we created our
CharacterCamera
to follow our character by using the
LateUpdate()
funcion to track the posiion of the character.
We will see a result similar to the following screenshot: