The cover system was introduced with the Shooter Motion Pack, however it can be used without it as well.
The primary motion for cover is the Basic Cover Strafe motion and it supports two different modes: tall cover and short cover.
Cover is activated by pressing the action alias associated with the motion. Typically this is defined as “Cover Toggle”.
When the action alias is pressed, raycasts will be made to see if the character is near valid cover. If so, we’ll go into the appropriate mode.
“Valid cover” is determined by a couple of things:
- Cover distance
- Cover height
- Cover layer
Cover can be manually exited by pressing the action alias again. However, it can also be exited automatically when the character moves away from the cover.
In both cases, the character will simply go back to the animation associated with his current stance and form.
Corners and View
When using a Camera Anchor, the cover system is able to adjust the view based on how the character is facing.
This helps you to see around the side.
When your character is up against a corner, we extend the view area even more to provide visibility around the corner.
With some motions like Basic Shooter Attack, the player can exit from corner while aiming or shooting and the character position and rotation will move to that of the current view. This allows for characters to exit cover quickly and stay focused on the target.