Recoil Mechanics & Pattern Compounding
Recoil in Wardogs is driven by per-shot angular impulse curves extracted from Unreal Engine DA_*_Stats data assets. Each round applies a discrete Pitch (vertical climb) and Yaw (horizontal drift) vector, modified by attachment compounding, mechanical barrel dispersion, and target engagement distance.
1. Unreal Engine Recoil Data Architecture
In Wardogs, weapon recoil is built on Epic Games' Gameplay Ability System (GAS). When inspecting the game's compiled .pak archives, assets utilize standardized engine prefixes:
| Prefix | Unreal Engine Type | Role in Recoil & Handling | Extracted Asset Example |
|---|---|---|---|
| DA_ | Data Asset | Authored base recoil pitch and yaw keyframe curves | DA_M4_Stats, DA_AK74_Stats |
| GE_ | Gameplay Effect | Modifier blueprints compounding handling multipliers | GE_MUZL_*, GE_FGRP_*, GE_MAGZ_* |
| GA_ | Gameplay Ability | Executable state machines governing firing, reload, and ADS | GA_Weapon_Fire, GA_Weapon_Reload |
Each weapon possesses an authentic per-shot angular impulse array:
- rawPitch (y): Vertical barrel climb in degrees (positive = upwards deflection).
- rawYaw (x): Horizontal barrel drift in degrees (positive = rightward kick, negative = leftward kick).
- Pitch Clamp (pitchMax): Ceiling boundary capping maximum cumulative vertical climb.
- Yaw Boundaries (yawMinMax): Lateral limits preventing unbounded horizontal deflection.
- Post-Pattern Drift: When continuous fire exceeds the authored curve keyframes, the engine transitions into steady-state procedural jitter via a deterministic pseudo-random walk generator.
2. Macro Recoil Path vs. Micro Stochastic Dispersion
A common question regarding Wardogs gunplay is whether recoil patterns are 100% identical on every spray. In the engine, recoil is a hybrid system comprising a fixed, predictable macro trajectory combined with stochastic micro variation:
The core recoil impulse curve is fixed and authored directly in game assets. Every time a weapon is fired, the muzzle climbs, pulls, and kicks along this exact sequence of angles.
This is the repeatable recoil pattern that skilled players learn and counteract through muscle memory (pulling down and opposite to lateral drift).
Two sprays are never 100% pixel-identical because of four stochastic factors:
- Shot-to-Shot Random Deviation: Physical angular cone perturbation (RandomDeviationDegree) rotating the impulse.
- MOA Barrel Spread: An inherent cone dispersion radius centered on each recoil node.
- Post-Pattern Jitter: Procedural random walk if magazine capacity exceeds curve keyframes.
- Shotgun Buckshot: Random radial distribution of 8 pellets within the choke cone.
3. Shot-to-Shot Random Angular Deviation (RandomDeviationDegree)
In the game source data (WDWeaponStatsData), individual bullet trajectory is governed by a dedicated physical property: RandomDeviationDegree. Unlike unitless multipliers, this value is a geometric angle measured in degrees (°).
Before applying the recoil impulse vector to the player's aim, the engine calculates a stochastic angular perturbation vector scaled by this envelope:
The angular perturbation envelope rotates the instantaneous impulse direction θbase=atan2(Y,X) within symmetric bounds:
◔The “Arrow on a Clock” Analogy
A common point of confusion is whether a RandomDeviationDegree of 35° adds a full 35 degrees directly to horizontal yaw. It does not. If 35° were added directly to yaw, a single round would violently whip the crosshair by nearly an eighth of a full circle (at 25 meters, a 35° deflection would miss the target center by over 17 meters), violating the engine's hard yaw clamp of ±22.5°.
Instead, visualize an arrow representing the recoil kick vector of an individual bullet:
- Length of the Arrow (Magnitude): Small, typically around 0.8° to 1.2° of angular climb.
- Direction of the Arrow: The predefined recoil curve points this arrow almost straight up at 12:00 (with a slight authored tilt to the left or right).
RandomDeviationDegree does not make the arrow longer. Instead, it tilts the orientation of the arrow on the clock face:
The arrow can tilt randomly up to ±35° from 12:00 (between roughly 11:00 and 1:00 on the clock face).
The arrow tilts only up to ±10° from vertical (between 11:40 and 12:20 on the clock face).
Trigonometric Resolution on Screen Yaw and Pitch
Because the recoil impulse is only about 1.0° in length, tilting it by an angle θtilt resolves into Cartesian crosshair offsets via basic trigonometry:
For a 1.0° impulse on the SUPER-45 tilted at the maximum 35°:
The resulting crosshair wobble on screen is only about half a degree (±0.57°), not 35 degrees.
Per-Shot Stochastic Sampling Sequence
Each bullet in a continuous burst samples a fresh uniform angle θtilt∼U[−RandomDeviationDegree,+RandomDeviationDegree]:
| Weapon Class | Firearm | Source Data Asset | RandomDeviationDegree |
|---|---|---|---|
| Sniper Rifles | AMR 50, MK22, SV-98, Mosin, Scout | DA_SR_04, DA_MK22, DA_SV98 | 4.0° |
| DMR | SKS | DA_SKS_Stats | 5.5° |
| DMR | BMR (RFB), SVD | DA_RFB_Stats, DA_SVDM_Stats | 10.0° |
| Assault Rifles | M4, Bushmaster M17S | DA_M4_Stats, DA_WEPN_032 | 10.0° |
| Assault Rifles | Galil | DA_WEPN_029_Stats | 12.0° |
| Assault Rifles | AK-74M | DA_AK74M_Stats | 13.0° |
| Assault Rifles | KH-2002, A-91, T-21 | DA_KH2002, DA_A91, DA_TAR21 | 15.0° |
| Assault Rifles | FAL | DA_WEPN_030_Stats | 16.0° |
| Submachine Guns | MP5 | DA_WEPN_026_Stats | 10.0° |
| Submachine Guns | AMP-9, PP-19 Vityaz | DA_MP9_Stats, DA_SMG_03 | 15.0° – 17.0° |
| Submachine Guns | SUPER-45 (Vector) | DA_Vector_Stats | 35.0° |
| Light Machine Guns | M249 SAW, PKM | DA_M249_Stats, DA_LMG_02 | 20.0° |
| Shotguns | M500, MP43 | DA_M12G_Stats, DA_MP43_Stats | 24.0° – 28.0° |
| Sidearms / Pistols | GGX-17, GGX-18, Judge, M1911, Deagle | DA_G17_Stats, DA_Pistol_* | 10.0° |
| Archery | Compound Bow | DA_Bow_Stats | 2.0° |
4. Attachment Multiplicative Compounding
Equipped attachments (Muzzle devices, Foregrips, Sights, and Magazines) modify vertical climb and horizontal drift multiplicatively using Unreal Engine MultiplyCompound attributes:
The adjusted angular deflection vector for shot i is:
- Equipped Muzzle: Flash Hider (
-16% climb → 0.84x) - Equipped Foregrip: Vertical Grip (
-30% climb → 0.70x) - Equipped Extended Mag: 60-Round Drum (
+8% recoil penalty → 1.08x) - Composite Multiplier: 0.84×0.70×1.08=0.63504⟹36.5% Net Climb Reduction
5. Trigonometric Projection to Target Distance
Because recoil impulses act as angular deflections at the barrel muzzle, linear physical displacement on a flat target down-range increases with target distance d (in meters):
For small angular deflections typical of rifle recoil (θ<5∘), the small-angle approximation holds: tan(θ)≈θ (in radians). Consequently, linear target displacement scales almost purely linearly with distance:
- At 25m, a 1.2∘ pitch climb produces: 25×tan(1.2∘)×100≈52.36 cm
- At 50m, the same 1.2∘ climb produces: 50×tan(1.2∘)×100≈104.72 cm (exactly double)
- At 100m, the climb produces: 100×tan(1.2∘)×100≈209.47 cm (exactly quadruple)
6. Minute of Angle (MOA) Barrel Dispersion Physics
In addition to directional climb, every firearm exhibits mechanical barrel dispersion defined in Minute of Angle (MOA). One MOA corresponds to 601∘≈0.0002908882 radians, producing a spread of 2.9089 cm per 100 meters.
The radius of the circular spread cone in centimeters at distance d is:
where MOAeffective=max(0.4,baseMoa×spreadMult).
To model a true uniform circular disk distribution without artificial clustering at the center pip, the radial distance is sampled using the square root of a uniform pseudo-random variable u2∼U[0,1):
7. Combined Cartesian Target Impact Coordinates
In the simulation engine (weaponBuilderEngine.ts), the total Cartesian impact coordinate (Xcm,Ycm) relative to center mass (0,0) combines macro recoil projection, shot-to-shot angular deviation jitter, and barrel MOA dispersion:
- Initial Shot (i = 0): Recoil displacement is exactly zero (θyaw=0,θpitch=0). The bullet strikes point-of-aim modulated only by tight cold-barrel MOA dispersion (0.4×rspread).
- Subsequent Shots (i ≥ 1): Displaced by cumulative angular climb/drift, rotated by the shot's RandomDeviationDegree envelope, projected across distance d, plus stochastic MOA barrel spread.
8. 12-Gauge Buckshot Pattern Simulation & Choke Constriction
Shotgun ballistics operate on multi-pellet conical cloud expansion. A standard cylinder bore produces an 18.0 cm radius (36.0 cm diameter) pattern at a reference distance of 15 meters:
- 1 Core Pellet: Concentrated tightly within r≤0.25×rpattern of the aim point.
- 7 Perimeter Pellets: Distributed radially across r∈[0.55,1.0]×rpattern with equidistant angular pacing and radial jitter.
| Choke Attachment | Spread Multiplier | Pattern Radius @ 15m | Total Pattern Diameter |
|---|---|---|---|
| Stock Cylinder | 1.00x | 18.0 cm | 36.0 cm |
| Improved Cylinder Choke | 0.80x (20% tighter) | 14.4 cm | 28.8 cm |
| Full Choke | 0.60x (40% tighter) | 10.8 cm | 21.6 cm |
9. Canvas Screen Projection & Perspective Scaling
In the visual target simulator (RecoilTargetCanvas.tsx), physical centimeters are converted to viewport pixels using an inverse perspective scale:
Screen coordinates on the HTML5 canvas are mapped directly from physical offsets:
Physical displacement on target grows with distance (Xcm∝d), while the apparent scale of the target silhouette on the shooter's retina/screen scales inversely (pxPerCm∝d1).
Increasing the distance slider accurately reflects how a target shrinks in angular size relative to the weapon's spray pattern, illustrating why tight recoil compensation becomes exponentially more demanding at extended ranges.
Visualize recoil spray patterns with real-time attachment stacking
The Gunsmith Builder allows full customization with live reactive target canvases and raw keyframe telemetry for every weapon.