Cover: designing a refusal
Cover is the primary defensive tool, and the part I would point at first is the feature it deliberately does not have.
Walking into a wall puts the player in cover after 4 frames of sustained contact, about 66 ms at 60 fps. There is no cover button, because the point is to remove a button press from the moment the player's attention is most expensive. Camera-relative input is then projected onto the wall's tangent, so a wall facing the camera slides with A/D and a wall on the player's left slides with W/S. Any arbitrary angle works without branches or per-wall authoring.
| Parameter | Value | Purpose |
|---|---|---|
| Walk speed in cover | 1.5 m/s | Slower than a normal walk, and sprint is disabled |
| Magnetic standoff | 0.42 m | Controller radius plus 0.1, with a corrective nudge at speed 10 |
| Snap-in delay | 4 frames | About 66 ms at 60 fps, which kills flicker off a glancing wall |
| Exit threshold | dot > 0.65 | Roughly 49° into the wall, so leaving cover is always deliberate |
| Footstep interval | 0.45 m | Lateral travel, which feeds AI hearing at a 1 m radius |
Corners don't wrap, and that's the feature
Nearly every third-person cover system lets you round an outer corner with a button. The character slides around, the camera follows, and you are on the new wall. It feels good. I built it, and it is not in the game.
The system commits to one wall. At an outer corner the peek camera looks around it while the body stays clamped at the edge. Getting onto the next wall means pushing away from the current one and re-engaging, which is a deliberate act taken while exposed. Inside corners had the opposite problem, where the detection fan alternated between two surfaces and jittered; normal-locking keeps the player committed to the original wall.
Auto-wrap glides the player blindly into space they have not looked at yet. That is a shortcut past observation, and Vulnerability outranks the comfort it would buy.
What it costs is written down rather than discovered later. There is no cover-to-cover dash, no scripted corner turn, and no vaulting over cover. Peek saves and restores the scene camera with FindObjectsByType, which allocates, and single-surface tracking means genuinely complex geometry can still break it.








