> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinemation.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Recoil

> Configure ShooterCore recoil data and connect it to Sci-Fi FPS Pack weapon and animation presentation.

export const intro_0 = "The Sci-Fi FPS Pack assigns weapon-specific ShooterCore recoil data to its weapon and weapon-view flow. Tune a project-owned data asset when a firearm needs different hip, aiming, fire-mode, camera, or controller response."

export const generalImageCaption_0 = "Recoil data General properties for camera shake, pivot offsets, space rotation, play rate, and playback offset."

export const generalImage_0 = 
  <img
    src="/images/shooter-core/unreal/RecoilDataAsset_General.png"
    alt="Recoil data General section showing camera shake, hip and aim pivot offsets, space rotation, play rate, and playback offset"
  />

export const inputImageCaption_0 = "Separate Input Aim and Input Hip pitch, yaw, roll, and kick values."

export const inputImage_0 = 
  <img
    src="/images/shooter-core/unreal/RecoilDataAsset_Input_Aim_Hip.png"
    alt="Recoil data Input Aim and Input Hip sections showing pitch, yaw, roll, kick, kick-up, and kick-reset values"
  />

export const curvesImageCaption_0 = "Recoil Curves map single-shot and automatic fire to rotation and location curves."

export const curvesImage_0 = 
  <img
    src="/images/shooter-core/unreal/RecoilDataAsset_Curves.png"
    alt="Recoil data Curves section showing SingleRot, SingleLoc, AutoRot, and AutoLoc curve assignments"
  />

export const smoothingImageCaption_0 = "Smoothing and multiplier values shape the recoil response."

export const smoothingImage_0 = 
  <img
    src="/images/shooter-core/unreal/RecoilDataAsset_Smoothing.png"
    alt="Recoil data Smoothing section showing rotation and location smoothing, multipliers, and Smooth Roll"
  />

export const controllerImageCaption_0 = "Controller Recoil properties define horizontal and vertical step response."

export const controllerImage_0 = 
  <img
    src="/images/shooter-core/unreal/RecoilDataAsset_ControllerRecoil.png"
    alt="Recoil data Controller Recoil section showing horizontal recoil, vertical recoil step, interpolation speed, damping, and compensation"
  />

export const additionalImages_0 = 
  <>
    <Frame caption="Recoil noise adds controlled variation to the response.">
      <img src="/images/shooter-core/unreal/RecoilDataAsset_RecoilNoise.png" alt="Recoil data Recoil Noise section" />
    </Frame>
    <Frame caption="Pushback configures the recoil displacement response.">
      <img src="/images/shooter-core/unreal/RecoilDataAsset_Pushback.png" alt="Recoil data Pushback section" />
    </Frame>
    <Frame caption="Progress controls the recoil progression over time.">
      <img src="/images/shooter-core/unreal/RecoilDataAsset_Progress.png" alt="Recoil data Progress section" />
    </Frame>
    <Frame caption="Recoil sway configures additional movement response.">
      <img src="/images/shooter-core/unreal/RecoilDataAsset_RecoilSway.png" alt="Recoil data Recoil Sway section" />
    </Frame>
  </>

export const weaponIntegration_0 = "In the Sci-Fi FPS Pack, AC_WeaponView forwards aiming, fire-mode, and fire events to the recoil component while the weapon owns fire rate and ammunition state. Keep this ownership split when you create a project weapon."

export const expectedResult_0 = "The weapon initializes AC_RecoilAnimation with the selected DA_RecoilData asset, changes recoil input when aiming or fire mode changes, and plays and stops recoil with the weapon firing lifecycle."

## Recoil system

{intro_0}

<code>AC\_RecoilAnimation</code> is the runtime recoil component. It is initialized with a <code>DA\_RecoilData</code> asset and a fire rate, then receives the current aiming and fire-mode state from the weapon view.

| Entity                                                                                                                                                                                  | Purpose                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| <code>AC\_RecoilAnimation</code>                                                                                                                                                        | Plays recoil and exposes the result to weapon animation and camera presentation.                                              |
| <code>DA\_RecoilData</code>                                                                                                                                                             | Stores recoil input, curves, smoothing, pivot, noise, pushback, progress, sway, camera-shake, and controller-recoil settings. |
| <code>E\_FireMode</code>                                                                                                                                                                | Identifies the active fire mode used by recoil playback.                                                                      |
| <code>F\_RecoilCurves</code>, <code>F\_RecoilNoise</code>, <code>F\_RecoilPushback</code>, <code>F\_RecoilProgress</code>, <code>F\_RecoilSway</code>, <code>F\_ControllerRecoil</code> | Group the configuration for each recoil layer.                                                                                |

## 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.

<Frame caption={generalImageCaption_0}>
  {generalImage_0}
</Frame>

<Frame caption={inputImageCaption_0}>
  {inputImage_0}
</Frame>

<Frame caption={curvesImageCaption_0}>
  {curvesImage_0}
</Frame>

<Frame caption={smoothingImageCaption_0}>
  {smoothingImage_0}
</Frame>

<Frame caption={controllerImageCaption_0}>
  {controllerImage_0}
</Frame>

{additionalImages_0}

## Connect recoil to the weapon lifecycle

{weaponIntegration_0}

1. Call <code>Init(NewRecoilData, FireRate)</code> during weapon or weapon-view initialization.
2. Call <code>SetAiming(IsAiming)</code> when ADS changes.
3. Call <code>SetFireMode(NewFireMode)</code> when the weapon changes mode.
4. Call <code>Play</code> while the firing lifecycle is active and <code>Stop</code> when it ends.

<Note>
  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.
</Note>

<Check>
  {expectedResult_0}
</Check>
