Core Concepts
Understanding Foundational Mechanics
Understanding Recoil and Spread
Recoil vs. Spread Mechanics
Recoil and Spread are two distinct but complementary systems that work together to create realistic weapon behavior:
Aspect
Recoil
Spread
Purpose
Simulates physical weapon kickback
Represents projectile dispersion
Pattern Type
Deterministic (predictable)
Probabilistic (randomized)
Player Control
Skill-based compensation
Uncontrollable variance
Visual Impact
Camera/weapon position shift
Bullet spread around crosshair
Key Interaction: Recoil directs the intended aim point movement, while spread determines actual projectile distribution around that point.
Pattern-Based Approach
The Adaptive Recoil & Spread plugin uses a pattern-based approach for both recoil and spread mechanics:
Recoil Patterns: Define precise, deterministic movement of the weapon aim point through a sequence of points on a 2D grid. These points represent the weapon's movement across multiple shots.
Spread Patterns: Define how projectiles disperse around the aim point using probability distributions that change based on various conditions.
Core
Recoil System
More information check out Recoil System.
UARSRecoilPattern: Asset type that defines the movement of the aim point during firing
UARSRecoilPointCollection: Collection of recoil points that define a recoil pattern
RecoilPatternEditor: Custom editor for creating and modifying recoil patterns
Spread System
More information check out Spread System.
UARSSpreadPattern: Asset type that defines how projectiles disperse around the aim point
SpreadPatternEditor: Custom editor for creating and modifying spread patterns
Runtime Components
UARSRecoilSpreadManager: The main component manages the application of recoil and spread during gameplay
UARSWeaponComponent: (Optional) The component which is responsible for integrating recoil and spread mechanics with a weapon actor.
Dynamic Modifiers System
The plugin features a robust modifiers system that allows for dynamic adjustment of both recoil and spread patterns:
UARSRecoilModifier: Base class to dynamically change recoil behavior. Check out Recoil Modifiers.
UARSSpreadModifier: Base class to dynamically change spread behavior. Check out Spread Modifiers.
Modifiers can be applied to:
Apply conditional modifiers based on character state (e.g., Moving - Increase base spread by 2x.)
Create weapon-specific characteristics
Apply modifier based on weapon attachments (e.g., Bipod - Reduce vertical recoil by 40%)
Apply different multipliers based on weapon firing modes like semi-auto, burst, full-auto etc.
Integration Workflow
The integration workflow follows these steps:
Create recoil and spread patterns in the editor
Add
UARSRecoilSpreadComponent
to your chracter's controller(Optional) Add the
UARSWeaponComponent
to your weapon actorAssign the patterns to the component
Configure modifiers to adjust behavior based on game conditions
Connect firing events to the component's API
Process the resulting aim offsets in your weapon logic
Last updated