Cover: designing a refusal
Cover is the main defensive tool and it has no button. Walking into a wall puts you in cover after 4 frames of contact. I kept a button press out of it because those are the moments when a player has the least attention to spare.
Camera-relative input projects onto the wall's tangent, so a wall facing the camera slides with A/D and a wall on your left slides with W/S. Any angle works without 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 rounds an outer corner with a button, and it feels good. I built it, and it is not in the game.
The system commits to one wall. Getting onto the next one means pushing away and re-engaging, which is a deliberate act taken while exposed.
Auto-wrap glides you blindly into space you have not looked at yet. Vulnerability outranks the comfort it would buy.
What it costs: no cover-to-cover dash, no scripted corner turn, no vaulting. Peek restores the scene camera with FindObjectsByType, which allocates, and single-surface tracking still breaks on complex geometry.








