Summary
In this chapter, we explored various aspects of environmental interaction. We started by setting up a first-person controller to work with our player character model. We then created a state machine in the Animator window for our player and added the appropriate motion clips. We set up the switch between states using a player animation script.
Finally, we added health power-ups for the player to collect in the level, and scripted a player response with the use of an additional camera and the player status script.
In the next chapter, we will return to our enemy characters and demonstrate how motion capture data can be implemented within a Mecanim-ready character.
We will define frame ranges in a source file to create useable loops, which can then be set up in the zombie character's state machine.