ABSTRACT

This chapter makes a character controller for our 3D adventure game. Character controllers contain the code that reads controller inputs and uses them to move and rotate our character in our game world. The chapter follows fairly closely the YouTube video titled “Character Controller in Unity” by PabloMakes. Pablo’s excellent video was made with a slightly older version of Unity and a different Unity layout. The controller uses a capsule collider that should envelope the character. The collisions that happen in the game are with this capsule, and the animations are just there for decoration. The Animation controller will use the Speed parameter, as determined by our script, and use it to run a blend of three animations: Idle, Walk, and Sprint.