Ammo Components

Weapons that rely on physical projectiles like grenade launchers, rockets, or magic bolts ammo prefabs that move through the scene and handle their own collision and damage logic.

This system consists of specialized scripts attached to projectile prefabs that manage their speed, impact behavior, and optionally, area-of-effect damage.

Warning

These components require rigidbody and collider components for it to detect collision and inflict damage.

🎯 Physical Ammo Overview

Unlike raycast-based barrels (which process hits instantly in a straight line), projectile weapons spawn a physical bullet GameObject. These bullets:

  • Travel forward at a configurable speed
  • Exist for a fixed lifetime
  • Detect collisions using physics
  • Trigger impact events or area effects upon hitting a surface or target

Note

The projectile object is spawned by the barrel (e.g., ProjectileBarrel or RocketBarrel) and must include one of the

The two types of ammo provided within this package are: