Spray pattern
A scriptable object that represents the spray pattern of the firearm.
Last updated
Was this helpful?
A scriptable object that represents the spray pattern of the firearm.
Last updated
Was this helpful?
A spray pattern is preset data for the firearm that helps improve the player's muscle memory. As players use the weapon more, they learn the spray patterns, making the game easier to master.
To create a spray pattern, start by opening the Create Asset menu. Right-click in the Project window, then go to Akila > FPS Framework > Weapons > Spray Pattern. This will generate a new spray pattern asset, and here's what you should see once it's created:
Total Amount
The power of the spray pattern determines how wide the spray is. The higher the value, the wider the spray will be, causing the bullets to spread more. A lower value results in a more concentrated spray.
Passive Multiplier
The minimum spray represents the starting point for the bullet spread. As you shoot, the spray increases, causing the bullets to spread more. When you stop shooting, the spray resets back to this minimum value, helping to control the weapon's accuracy.
Ramp-Up Time
The time taken to go from the maximum spray to the minimum spray. Determines how quickly the bullet spread resets after you stop shooting. A shorter time will cause the spread to return to the minimum quickly, while a longer time will make the reset slower.
Is Randomized
If the spray pattern is not randomized, the curves will be used instead to define the bullet spread. When the spray pattern is randomized, the spread will vary with each shot based on the pattern data.
Vertical recoil
Refers to the upward movement of the firearm when firing, typically caused by the force of the shot.
Horizontal recoil
refers to the sideways movement of the firearm when firing, typically caused by the force of the shot.
To use the spray pattern, assign it to the "Spray Pattern" or "Aim Spray Pattern" field in the firearm preset of your gun.