BPC_FirearmSystem — Firearm Component
Blueprint Spec — UE 5.5–5.7
Parent Class
ActorComponent
Dependencies
Purpose
Ranged weapon specialization. Handles line trace / projectile fire, weapon spread, bullet drop simulation, and multi-hit logic. Used by firearms (pistols, rifles, shotguns) and charge weapons.
Variables
| Name |
Type |
Description |
FireType |
EFireType |
Hitscan, Projectile, Hybrid |
ShootEffectType |
EShotEffect |
Single, Spread, Charge |
Range |
Float |
Max effective range (cm) |
SpreadAngle |
Float |
Base spread in degrees |
SpreadRecoveryRate |
Float |
Per-second recovery from spread |
CurrentSpread |
Float |
Running spread (fired recently) |
MaxSpread |
Float |
Spread cap |
BulletsPerShot |
Int |
e.g. shotgun = 8 |
ProjectileClass |
Actor (Blueprint) |
Only for Projectile / Hybrid fire types |
FireSocket |
FName |
Muzzle attachment point |
MuzzleLocation |
USceneComponent |
Muzzle transform reference |
HitScanImpacts |
Array |
Notify component for decals |
Enums
| Enum |
Values |
Description |
EFireType |
Hitscan, Projectile, Hybrid |
Ray → Instant or Bullet actor |
EShotEffect |
SingleShot, SpreadShot, ChargeShot |
Fire pattern |
Functions
| Name |
Inputs |
Outputs |
Description |
PerformHitscanFire |
EWeaponFireMode |
Array |
Line trace from camera to crosshair; no bullet |
SpawnProjectile |
Direction: FVector |
Actor |
Spawn projectile actor with initial velocity |
CalculateSpread |
— |
FVector |
Apply random offset within CurrentSpread cone |
OnFire_Implementation |
— |
— |
Override of WeaponBase::OnFire; runs hit scan or spawns projectile |
ApplyRecoil |
— |
— |
Add camera rotation via CameraStateLayer |
ConsumeAmmo |
— |
— |
Delegate to BPC_AmmoComponent |
GetEffectiveRange |
— |
Float |
Return weapon range from data asset |
Blueprint Flow
Communications With
Reuse Notes
- Hit scan fire uses camera forward, not muzzle forward, for accuracy. Muzzle is for FX only.
- Spread is cumulative while firing, resets on recovery timer.
- Projectile type requires a child BP implementing
AP_BaseProjectile with velocity and lifetime.
- Renamed from
BP_RangedWeapon to BPC_FirearmSystem per Master naming convention.
- Cross-references updated:
BPC_DamageHandlerComponent → BPC_DamageReceptionSystem, BPC_PlayerCameraManager → BPC_CameraStateLayer, DA_WeaponData → 14-data-assets/.