Skip to main content

Recoil system

AC_RecoilAnimation is the runtime recoil component. It is initialized with a DA_RecoilData asset and a fire rate, then receives the current aiming and fire-mode state from the weapon view.

Configure the recoil data asset

Set the general camera and pivot properties, then provide separate hip and aim values for pitch, yaw, roll, kick, and kick-up. Use the rotation and location curves for single-shot and automatic fire modes.

Connect recoil to the weapon lifecycle

  1. Call Init(NewRecoilData, FireRate) during weapon or weapon-view initialization.
  2. Call SetAiming(IsAiming) when ADS changes.
  3. Call SetFireMode(NewFireMode) when the weapon changes mode.
  4. Call Play while the firing lifecycle is active and Stop when it ends.
Create a project-owned recoil data asset per weapon or recoil family. Keep the supplied pack asset available as a reference and do not hard-code camera offsets in each weapon Event Graph.