Quick Start
This section will guide you through setting up and implementing the Adaptive Recoil & Spread plugin in your project.
Quick Start Guide
1. Create Required Assets
First, create the pattern assets you'll need:
In the Content Browser, right-click and select Recoil & Spread → Recoil Pattern

Name it appropriately (e.g., "RP_AssaultRifle")
Right-click again and select Recoil & Spread → Spread Pattern
Name it (e.g., "SP_AssaultRifle")
2. Set Up Your Weapon Actor
If you already have a weapon actor, add the ARS Weapon Component to it. Or you can just add to your character it is depend on your code and structure:
Open your weapon Blueprint
Click the Add Component button
Search for "ARS Weapon Component" and add it
In the Details panel, assign your created Recoil Pattern and Spread Pattern assets

// Example C++ code for setting up a weapon with ARS
#include "Components/ARSWeaponComponent.h"
UCLASS()
class AMyWeapon : public AActor
{
GENERATED_BODY()
public:
AMyWeapon()
{
// Create component
ARSWeaponComponent = CreateDefaultSubobject<UARSWeaponComponent>(TEXT("ARSWeaponComponent"));
}
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Weapon")
UARSWeaponComponent* ARSWeaponComponent;
};
3. Basic Pattern Configuration
Configuring a Recoil Pattern:
Double-click your Recoil Pattern asset to open the custom editor
Click the "Add Point" button to create points in the pattern
Arrange the points to create your desired recoil path
Adjust point properties in the Details panel
Save the asset when finished

Configuring a Spread Pattern:
Double-click your Spread Pattern asset to open the editor
Adjust the spread curve to define how spread increases with continuous fire
Set base spread values and recovery rates
Configure spread modifiers as needed
Save the asset

4. Setup Player Controller
As the last step, we need to add the "ARSRecoil Spread Manager Component" to the player controller.

5. Testing Your Setup
Create a test map or use an existing one
Place your weapon in the level or equip it to a character
Play the game and fire the weapon to observe recoil and spread
Use the debug visualization options in the ARS Weapon Component to see patterns in real-time
Adjust your patterns based on observed behavior
Next Steps
After completing this basic setup, you can:
Fine-tune your recoil and spread patterns
Add modifiers to adjust behavior based on game conditions
Implement more advanced features like aim-down-sight modifications
Create different patterns for various weapons
Last updated