Skip to content

Character: About

Jakub Lukasik edited this page Sep 6, 2021 · 4 revisions

This page describes design of default outerra character controller implementation.

Implementation of character can be separated to 4 parts.

  1. Charob Implementation
  2. Animation Graph
  3. Character Controller
  4. Mind Controller

1. Charob Implementation

This part is primary responsible for gluing all other parts together. It initializes character controller with instance of animation graph, mind controller and all input handlers. It's main purpose is process inputs from player, simulate both controllers and feed resulting movements and rotations to engine.

2. Animation Graph

Info about graphs here Graph combines main 4 layers. Locomotion, aiming, left hand pose and right hand pose. Locomotion is responsible for on feet movement and siting poses in vehicle. Aiming is addition on top of first layer and modifies top part of body for weapon aiming. Hand pose layers modify only hands, and is used for interactive vehicle control poses (hand poses for buttons, levers, steering, ...) also with arm IK.

3. Character Controller (char_ctrl)

Is responsible for locomotion of character. Calculation of desired movement direction and speed, feeding it to animation system and then getting real movements from simulated animation instance. Processing of inputs from keystroke to model update then is: key push -> calculation of desired speed -> anim instance inputs set -> simulate anim instance -> get delta root motion from anim instance -> apply motion to object. Reason for this pipeline is, that player holding 'W' wants to go full speed forward, char_ctrl calculate speed, but animation can be (and usually is) nonlinear, so it must be applied properly to avoid feet sliding.

4. Mind Controller 👽

Mind controller is build on top of character controller and is extending locomotion functionality with more complex actions. Vehicle driving, vehicle knob operating, picking and dropping items and much more. All action that needs to be resolved with surroundings and another objects are done by this part of code. Animations of these actions are usually done by arm IK, so system to prioritize IK targets when multiple actions are triggered at the same time is used.

Test

Clone this wiki locally