Collision modes
What it is
Every weapon declares a collision mode that decides what happens when its projectile or beam touches an enemy. The mode controls whether the projectile dies, keeps going, or follows a special collision shape entirely (instant line trace, chain of jumps).
The five modes
| Mode | Hit rule | Lifetime after hit | Damage falloff | Typical weapon families |
|---|---|---|---|---|
| First hit | Damages one enemy on contact, then the projectile dies | Bullet ends immediately after the hit | None | Rifle, revolver, cannon, mortar, flame, missile, fire-trail |
| Pierce all | Damages every enemy in the projectile’s path; each enemy is hit at most once per projectile | Bullet keeps flying until its travel time expires | None | Shotgun, disc, line (tesla), sweep, magnetar, fire-ring, barrier (orbiting shield arc) |
| Target only | Locks to a single enemy id chosen at spawn; ignores every other enemy. If no lock is set, falls back to a first-hit collision against whatever it touches first | Bullet ends on the locked-target hit | None | Homing missile, artifact-spawned guided bombs |
| Beam trace | Instant line from the ship out to beam range, applied the same frame the weapon fires; damages every enemy whose center sits within the beam’s half-width of that line, each hit at most once | No projectile in the gameplay sense — a visual entity lingers for the beam fade only, with the hit window open for the first slice of its life | None along the beam path (every enemy on the line takes full damage) | Railgun, burst rifle (hitscan rounds), beam-family weapons, certain legendaries |
| Chain arc | Picks one starting target inside the first-target range, hits it, then the chain behavior jumps from enemy to enemy on a one-jump-per-frame cadence within the chain radius | Bullet entity persists for the full chain sequence so subsequent jumps can resolve | Each jump multiplies the damage that arrived at the previous target by the chain falloff coefficient | Chain lightning |
Pierce-all projectiles store a per-projectile hit set, so the same enemy cannot be re-hit by the same projectile even if it lingers in its path.
Chain arc’s default falloff coefficient is shown below; weapons may override it via their spec.
| Chain stat | Default value |
|---|---|
| Damage retained after each jump | 0.88 of the previous target’s damage |
| Lightning weapon override | 0.88 |
| Delay between jumps | 0.12 seconds |
Beam-trace weapons keep their hitbox active for a short window after the fire frame so enemies that walk into the beam line during its visual fade also take damage.
| Beam-trace timing | Value |
|---|---|
| Visual lifetime of the beam entity | 1.00 seconds |
| Window during which the beam can still damage new enemies | 0.10 seconds |
Interactions
Collision mode and the destructibles flag are independent: a projectile can pierce enemies while still being blocked or not by crates and barriers, controlled by the weapon’s destructibles flag rather than its collision mode.
Pierce count is the engine-level field that drives standard projectile collision. The collision mode sets that field at spawn time: pierce-all projectiles get an effectively infinite pierce budget, while first-hit and target-only projectiles get a budget of zero so they end on their first hit. Beam-trace and chain-arc projectiles bypass the pierce-count path entirely — they use their own collision routines.
Every successful hit on an enemy fires the damage-tag hit signal that drives artifacts, passives, and other tag-keyed effects. Beam-trace and chain-arc hits fire the same signal once per damaged enemy. Pierce-all projectiles fire the signal once per unique enemy hit, not once per pass-through frame. For weapons that declare both a primary and secondary damage tag (legendary pair-merges), the signal fires once for each tag so effects keyed on either parent tag react to the same hit.