Demo - Third Person Kinematic Character Controller
About the Project Features & Development of the Third Person KCC
Third Person Kinematic Character Controller (KCC) was built in Unity and includes the following features
Collision Detection & Resolution System:
– Pairs Unity’s built-in functionality (primitive collider casts & overlaps) with custom checks and resolutions for all three primitive collider types. This system can be used for detection and resolutions along horizontal & vertical movement, ground and slopes. It also includes flexible user defined collision masks and collider sizes to customize the collision behavior desired.
– Below is an example of the overlap and trace checks performed for sphere colliders. The results from these functions are directly used in the detection and resolution code.
Finite State Machine:
– Includes basic states such as walk, run, idle, fall , and jump (uses Velocity Verlet). States can be added, removed, or edited without needing to change any of the main controller scripts excluding event registrations. – Uses Unity’s input system with an input event manager to alert the character controller of any registered user input regardless of the input device (if supported). – Below is an example of the state machine that is called directly inside the character controller. It is fed different states depending on the user input and game state. It keeps track of the the current and previous states, so that different code within the transitioning state can be executed.