-
Notifications
You must be signed in to change notification settings - Fork 5
Character: About
This page describes design of default outerra character controller implementation.
Implementation of character can be separated to 4 parts.
- Charob Implementation
- Animation Graph
- Character Controller
- Mind Controller
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.
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.
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.
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