Overview | Videos | Documentation | Demos | Integrations | API | Support

Doc Home > Character > Abilities > Cover

The cover ability allows the character to take cover behind other objects. The cover system is a runtime cover system and pre-defined cover points do not need to be setup ahead of time. Instead, the cover system uses layers to determine if an object can be used for cover. The ability can specify what layers can be used for cover by the CoverLayer LayerMask. When the character initially decides to take cover they will move towards the cover point.

Once arrived at the cover point the character will rotate to face in the opposite direction of the cover. It does this using a raycast at the center of the character’s body. As the character strafes while in cover a raycast will be used to keep the character rotated in the opposite direction of the cover.

When the character reaches an edge they will no longer be able to strafe. If the character starts to aim they will pop out of cover ready to fire. As soon as the character is no longer aiming they will move back into cover.

Take Cover Distance
The maximum amount of distance that they can take cover from

Cover Layer
The layers which the character can take cover on

Min Move To Target Speed
The normalized speed that the character moves towards the cover point

Take Cover Rotation Speed
The speed that the character can rotate while taking cover

Cover Offset
The offset between the cover point and the point that the character should take cover at

Cover Angle Threshold
Can move and continue to take cover behind objects as long as the new cover has a normal angle difference less than this amount

<- Climb
Damage Visualization ->