Projectile Barrel

The ProjectileBarrel is a base barrel extension that launches physical projectiles instead of using raycasts. This allows for slower, arcing, or visually persistent munitions—ideal for grenades, rockets, or fantasy spells.

✅ Ideal For

  • Grenade launchers
  • RPGs
  • Magic spells
  • Plasma or energy projectiles

⚙️ How it works

Each time the barrel fires:

  1. A projectile prefab is spawned at the barrel’s spawn point.
  2. The projectile handles its own movement and collision.
  3. Damage and effects are triggered when the projectile hits something or after a delay.

Note

Because the projectile is a separate GameObject, it allows for more dynamic behavior like gravity, bounce, and trail effects.

📐 Additional Settings

Aside from the base barrel logic, the projectile barrel introduces new settings highlighted in the red box in the image below

FieldDescription
Projectile PrefabThe prefab that will be instantiated and launched when firing.
Damage PointsDamage applied by the projectile on impact.
PooledWhether the projectile is spawned using object pooling (recommended for performance).
Prewarm CountNumber of projectiles to pre-instantiate if pooling is enabled.
On Projectile Spawned (Projectile)Event triggered after the projectile has been instantiated. Use this to initialize logic, add VFX, or attach metadata.