Skip to content

Set up cover in a level

The cover system needs no special actors: it finds cover with traces against the level geometry. This page lists what the geometry needs so every cover feature works, and how to test a level.

Requirements at a glance

Feature The level needs
A playable level The level's GameMode Override set to GM_Sandbox (World Settings) and a Player Start.
Taking cover Walls whose collision blocks the Cover channel (every profile that blocks Visibility does, so the default for static meshes).
Low vs. high cover Walls that do not reach High Cover Height (148 cm above the feet) are low cover. The check is a sphere trace (Cover Trace Radius, 12 cm), so a wall down to about 136 cm still counts as high.
Cover run A NavMeshBoundsVolume covering the play area, with the navmesh built, and floor the character can stand on in front of the target cover.
Vault from cover The cover must block the Traversable channel (see Make objects traversable) and be low enough to vault.
Corner turn An outside corner of at most Corner Turn Angle (100 degrees between the normals of the two faces), with at least Corner Turn Min Width (50 cm) of wall around it.
Aim around an edge Free space past the wall end: a capsule width plus Cover Aim Edge Clearance (20 cm).
Pose lowering Walls at least 10 cm thick, so the down trace from the top finds them.

1. Block out the cover

To start from an empty level, use File > New Level > Basic, open Window > World Settings and set GameMode Override to GM_Sandbox. The Basic level already has a Player Start and a floor. (Or work in a copy of DefaultLevel, which already has all of this.)

Any static mesh works as cover. The demo levels use LevelBlock and LevelBlock_Traversable from /GASPALS/Levels/LevelPrototyping, which you can place and scale directly.

Good cover heights for the sample characters (about 180 cm tall):

Height Plays as
90 to 110 cm Low cover: the character crouches behind it, can aim over it, can vault it.
110 to 130 cm Low cover, but the character barely clears it when standing to aim.
150 cm and more High cover: the character stands; aiming steps out at the wall ends.

Avoid walls between about 130 and 150 cm: they sit at the boundary between low and high cover, so a small height change along the wall changes how the character plays it.

Leave at least a capsule width (about 80 cm) of floor along the cover so the character can move along it.

2. Check the collision

Select a wall and look at Collision Presets in its Details panel. BlockAll, BlockAllDynamic and TraversalObjectPreset all block Cover. InvisibleWall and triggers ignore it, and so do characters. Avoid simple collision that does not match the visible shape: the character hugs the collision, not the mesh.

Exclude or include objects. Set the object's Collision Presets to Custom and change its Cover response:

  • Ignore keeps it from being cover: foliage, see-through fences, props too small to hide behind. The character walks past it, and the cover marker does not show on it.
  • Block makes it cover even if it ignores Visibility, for example an invisible blocking volume along a broken wall.

Shots from cover still trace Visibility (the camera's Aim Trace Channel), so excluding an object from cover does not let shots through it.

Type show collision in the console during Play to see what the traces hit.

3. Add navigation for cover runs

The cover run follows a navmesh path to the target cover.

  1. In the main toolbar, open the Add (+) menu and choose Volumes > Nav Mesh Bounds Volume. Scale it over the whole play area.
  2. Press P in the viewport to show the navmesh (green). It must reach the floor in front of the cover. If it does not appear, use Build > Build Paths.
  3. Keep Project Settings > Engine > Navigation System > Allow Client Side Navigation on for multiplayer (the template sets it; see Project settings).

Without a navmesh the character runs to the cover in a straight line, and stops at the first obstacle.

4. Make cover vaultable

Pressing jump in cover vaults over it through the traversal system. Traversal only considers geometry that blocks the Traversable trace channel. Use LevelBlock_Traversable, set the wall's collision preset to TraversalObjectPreset, or set its Traversable response to Block in a custom preset. On walls that do not block it, the Mover pawn jumps instead and the CMC pawn does nothing.

5. Test

Press Play and check:

  1. Walk into a high wall: the character takes soft cover and turns along it.
  2. Put the crosshair on a wall within 2.5 m and tap Q: the cover marker shows on the wall and the character snaps to it in sticky cover.
  3. Put the crosshair on a wall 3 to 15 m away and hold Q: the marker shows, and the character runs there and takes sticky cover.
  4. In sticky cover, hold the move input toward a wall end: the character stops at the end, and after 0.3 s walks around an outside corner.
  5. Behind low cover, aim (Right Button) over the wall: the character stands up; aim along the wall: it stays down.
  6. In cover behind low cover, press Space: the character turns to the wall and vaults over it.

Press N to switch between the Mover and CMC pawns and repeat the checks on both. For multiplayer, set Number of Players to 2 and Net Mode to Play As Listen Server in the Play options (the menu next to Play), and try the cover run on the client.

For debugging, turn on Enable Debug on the pawn's cover component to draw the cover traces and Cover Aim Debug to print aim pose changes, and use show collision and the navmesh view (P).

Common problems

Symptom Cause
The character never takes cover The wall ignores the Cover channel, the project has no Cover channel (copy the collision settings, or set Cover Trace Channel to Visibility), or Enable Cover is off on the pawn's cover component.
A trigger or volume behaves like a wall It uses Custom collision that blocks Cover (a new channel's default response). Set its Cover response like its Visibility response.
Cover drops when moving along a long wall The wall is made of pieces with gaps or uneven faces. Close the gaps, or raise Max Cover Turn Angle for bends.
No character spawns, or a default pawn flies around The level's GameMode Override is not GM_Sandbox.
A standing character walks into low cover without taking it Expected: soft low cover needs crouching. Crouch first (C), or use sticky cover (Q).
The cover marker does not show The crosshair is not on cover the button can take: farther than Cover Run Range (15 m), no floor to stand on in front of it, or (with Enable Cover Run off) farther than Sticky Cover Reach.
The cover run goes straight into an obstacle No navmesh, or the navmesh does not reach the target.
The cover run works on the server but not on clients Allow Client Side Navigation is off.
Jump in cover jumps instead of vaulting The cover does not block Traversable, or it is too high to vault.
The corner turn stops at the wall end It is an inside corner, the corner is sharper than Corner Turn Angle, or the wall around it is thinner than Corner Turn Min Width.
The character sinks into low cover The cover top is lower than the head clearance assumes; lower Cover Lower Max Crouch.

More settings are in Configure cover behavior.