Skip to content

Weapons

The Weapon module provides RangedWeapon, MeleeWeapon, and ThrowableWeapon equipment instances, plus fire, reload, and target-lock abilities.

Execution model

  • Authority — State Authority resolves authoritative hits, damage, ammo, reload completion, and equipment.
  • Prediction — Input Authority may predict fire/reload abilities when configured for local prediction.
  • Replicated — ammo, reload state, weapon/equipment state, target results, Health, and effect state.
  • Local only — muzzle flash, tracer/projectile visual, impact particles, audio, recoil, and crosshair.
  • Ranged weapons resolve an immediate trace.
  • Melee weapons resolve a short trace.
  • Throwable weapons simulate a pooled local ProjectileVisual while authoritative damage enters replicated state.

Configure immutable fire modes and attack parameters on the weapon definition. Keep ammo and reload state authoritative. Presentation—trails, impacts, particles, sound, and camera response—must not apply damage or otherwise own gameplay results.

AimedWeapon supports target lock and auto-aim cones. Explicit lock has priority, while precise aim can bypass automatic target selection.

See Character Controller, Weapon, and Feedback.

Next: UI.

RedEngine Framework documentation