Chapter 4. The Game Mechanics
In Chapter 3, RPG Character Design, we covered a wide range of topics to prepare your character model for the game. We looked at how to import and set up our character model, created the BaseCharacter
class, used the Animator Controller to set up the state diagram, created the initial character controller to handle the motion and behavior of our character model, and finally, looked at some basic inverse kinematics for the foot.
In this chapter, we will expand on the character player and also the non-character player, covering the following topics:
- Customizing the player character:
- Customizable parts (model)
- C# code for customization
- Preserving character state
- Recap
- Non-player characters:
- Non-player character basics
- Setting up the non-player character
- Navmesh setup
- NPC Animator Controller
- NPC Attack
- NPC AI
- PC and NPC interaction