Guide
Game corner peek and lean mechanics systems explained
Harbor Ridge's tactical shooter beta shipped a lean key that slid the first-person camera 35 cm past cover while the server still registered hits against the upright torso capsule centered on the player's feet. Holders saw only a gun barrel; peekers saw full crosshair before their head hitbox cleared the wall. Ranked telemetry tagged 58% of corner deaths as “prefire or wallhack” because defenders could not tell whether they lost a fair angle fight or got shot through geometry that looked solid on their screen.
The refactor bound lean offset to a split hitbox model: head and upper-chest capsules translate with lean, lower body stays anchored, and lag compensation rewinds the same capsules the server uses for damage. Angle-dispute reports fell from 58% to 12%; jiggle-peek skill expression rose once players trusted that what they saw matched what could be shot. Corner peeking is the micro-loop that defines tactical shooters — this guide covers peek taxonomy, lean FSM design, camera vs hitbox sync, peeker's advantage math, stance coupling with crouch and prone, server authority, the Harbor Ridge refactor, a technique decision table, pitfalls, and a production checklist alongside ADS and hip-fire systems.
Peek taxonomy: what players actually do at corners
Treat peeking as a family of movement intents, not a single animation. Each type trades information gained against exposure time:
| Peek type | Movement | Info gained | Exposure |
|---|---|---|---|
| Jiggle peek | Tap A/D past corner, immediate return | Enemy position, crosshair pre-aim | Minimal if hitbox syncs |
| Shoulder peek | Lean or strafe until shoulder clears | Wide angle without full commit | Head partial; bait shots |
| Wide peek | Full strafe into lane with pre-aim | Trade angle; claim space | Full body if slow |
| Crouch peek | Drop hitbox under head-level hold | Break vertical pre-aim | Lower profile, slower exit |
| Jump peek | Brief airborne clear over low cover | Info over sandbags/crates | Predictable arc; loud audio |
| ADS commit peek | Enter ADS while clearing | Precision first shot | Slower move speed; tunnel vision |
Your mechanics should make jiggle and shoulder peeks rewarding but readable. If lean exposes gun before head, defenders pre-fire barrel positions and peekers feel cheated when they die before seeing anyone. If lean exposes head before gun, peekers cannot shoot when they think they can — another fairness failure. Target: gun muzzle, optic, and damage capsule clear cover within the same 1–2 frame window at 60 Hz simulation.
Audio and footstep coupling
Peeks fail silently when lean does not trigger surface-specific footstep events. A jiggle peek that makes no sound is indistinguishable from a wallhack pre-aim. Emit short shuffle samples when lean crosses a distance threshold; attenuate when crouched. Pair with footstep detection on the AI and PvP hearing radius so info peeks have counterplay.
Lean FSM: input modes and state transitions
Lean is a finite-state machine layered on locomotion, not a free camera slide. Typical states:
- Neutral — centered capsule; no lateral offset
- Lean-in (left/right) — hold Q/E or stick tilt; capped offset
- Lean + ADS — reduced lean range while scoped; slower enter
- Lean + crouch — lower profile; often disables full lean
- Sprint lockout — cannot lean while sprinting; cancel sprint on lean input
- Recover — brief blend back to neutral when releasing key
Toggle vs hold: competitive shooters almost always use hold-to-lean so players cannot forget they are offset. Toggle lean causes “stuck lean” deaths when players rotate without resetting. If you support toggle for accessibility, show a persistent HUD chevron indicating lean direction.
Offset limits and collision
Cap lean translation at 25–40 cm or 30–45% of shoulder width. Beyond that, the camera sees around corners the hitbox cannot reach — the Harbor Ridge bug. Run a swept capsule test along lean direction; if wall blocks further travel, clamp both camera and hitbox together. Never let the camera clip through mesh while the body stays behind cover.
Third-person vs first-person lean
Third-person cover shooters often use corner-snap: character hugs wall, camera orbits to shooting shoulder. First-person tactical titles use lateral slide. Third-person must rotate the damage capsule with the visible mesh; first-person must not rely on mesh visibility alone because only the holder sees their view. Both need server-authoritative lean amount in the player state snapshot.
Camera offset vs hitbox sync
The failure mode that generates cheat accusations is desync between aim origin and damage volume. Production rules:
- Single source of truth — server stores lean angle 0.0–1.0 per side; clients interpolate for render
- Split capsules — translate head and chest; keep pelvis near feet anchor for stability
- Weapon origin — muzzle socket follows chest capsule; traces start where bullets visually leave
- ADS coupling — when ADS activates, reduce lean multiplier so optic alignment stays believable
- Recoil inheritance — lean direction does not invert recoil patterns; offset aim pivot from shoulder, not world origin
Debug visualization: draw server capsules on kill cam rewind so victims can verify whether a peek was legal. Harbor Ridge added lean amount to kill-event payloads after the refactor; unfair-death tickets citing “shot before visible” dropped sharply once rewind showed matching capsules.
Peeker's advantage math
The peeker usually wins reaction time because the holder must react to movement while the peeker pre-aims a known lane. Network latency amplifies this: the peeker's client sees themselves clear the corner several milliseconds before the holder's client receives the updated position. Mitigations that preserve skill without killing pace:
- Keep simulation tick at 64–128 Hz for competitive playlists
- Cap lag-compensation rewind window (e.g. 200 ms) so extreme peek advantage cannot pull holders into past positions
- Require minimum lean fraction before hitscan traces register outside cover
- On holder client, optional subtle edge-ping when enemy lean capsule crosses LOS (tunable, off in hardcore)
You cannot remove peeker's advantage entirely without making holders dominant. Design for explainable losses: kill cam shows lean fraction and capsule outline at fire frame.
Corner geometry and level-design contract
Peek fairness is half code, half map metrics. Standardize:
- Corner radius — 15–25 cm bevel on competitive meshes; sharp 90° corners create ambiguous LOS
- Cover height bands — head-high, crouch-high, full-block; document which peek types each supports
- Thin wall thickness — minimum 20 cm so lean capsules cannot overlap both sides
- Vault vs lean — if players can mantle, do not also allow full lean through the same gap
Automated map validation: raycast from lean extremes at sample corners; flag positions where camera LOS clears before damage capsule. Harbor Ridge's level pipeline added this gate to ranked map submissions after three community maps shipped exploitable thin crates.
Harbor Ridge refactor walkthrough
Harbor's combat team replaced cosmetic lean with an authoritative pipeline:
- Lean channel in player state — signed float −1..1 replicated at 32 Hz minimum
- Split hitbox rig — head and chest translate 0–32 cm; pelvis moves 0–8 cm for weight shift
- Collision clamp — swept test stops lean when shoulder capsule touches mesh
- Fire gate — hitscan disabled until chest capsule clears cover plane by 5 cm
- Lag comp alignment — rewind uses lean at fire tick, not neutral pose
- Kill cam overlay — ghost capsules on rewind; lean meter in recap corner
- Playlist toggles — ranked enables lean; arcade playlist disables lean, wider jiggle only
Outcomes: angle-dispute reports 58% to 12%; average corner engagement duration rose 9% (more jiggle meta); pre-fire accusations per thousand matches fell 64%; lean usage stabilized at 38% of ranked rounds among Diamond+ players.
Technique decision table
| Approach | Best for | Weak when |
|---|---|---|
| No lean; strafe-only peek | Arcade, high TTK, controller-first | Tactical depth; shoulder baiting |
| Camera-only lean | Quick prototype | Cheater accusations; competitive ranked |
| Synced split hitbox lean | Tactical FPS, CS-style angles | Higher anim and netcode cost |
| Corner snap (third-person) | Cover shooters, PvE | Competitive PvP clarity |
| Automatic low-cover pop | Hero shooters, fast pace | Skill expression; esports clarity |
| Lean disabled ranked / enabled casual | Split skill floors | Players must relearn between modes |
Common pitfalls
- Camera leads hitbox — the Harbor Ridge launch bug; always clamp together.
- Lean through walls — no swept collision on offset capsules.
- Fire before visible — traces start at camera, not muzzle; gate on capsule clearance.
- Ignoring lean in lag comp — holders see neutral pose rewound; peeks look magical.
- Toggle lean without HUD — players die unaware they are offset.
- Full lean while sprinting — breaks move-speed budget; snap angles feel random.
- Identical lean both directions on asymmetric cover — one side gets free intel.
- Silent jiggle peek — no audio cue; reads as wallhack pre-aim.
- Thin props in ranked — lean overlaps both sides; ban in validation.
- No kill-cam lean debug — disputes never resolve; trust erodes.
Production checklist
- Define peek taxonomy and which types each cover height supports.
- Implement lean FSM with hold-default input and sprint lockout.
- Replicate lean amount server-authoritatively in player snapshots.
- Translate head and chest capsules with collision clamp.
- Align muzzle traces and optic with translated weapon origin.
- Gate hitscan until damage capsule clears cover plane.
- Include lean pose in lag-compensation rewind.
- Couple lean range with ADS and crouch states.
- Emit footstep/shuffle audio on lean threshold cross.
- Validate corner geometry for thin-wall and LOS ordering.
- Expose lean debug on kill cam rewind.
- Telemetry: lean usage, angle-dispute tags, time-to-first-shot on peek.
Key takeaways
- Peeking is information trading — jiggle, shoulder, and wide peeks need distinct exposure profiles.
- Camera and hitbox must move together — cosmetic lean destroys ranked trust.
- Peeker's advantage is structural — mitigate with sync, caps, and explainable kill cams.
- Lean belongs in server state — lag compensation must rewind the leaned pose.
- Harbor Ridge cut angle disputes 58% to 12% with split hitboxes and fire gates.
Related reading
- Aim down sights and hip fire systems explained — ADS FSM, spread curves, engagement bands
- Hit registration and lag compensation explained — server rewind authority
- Crouch and prone stance systems explained — profile height and stance FSM
- Tactical shooter design explained — round structure, economy, and angle meta