> For the complete documentation index, see [llms.txt](https://kinemation.gitbook.io/pras-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinemation.gitbook.io/pras-documentation/basics/recoil-settings.md).

# Recoil Settings

All settings are located in the **Recoil Data** asset (to create one, right-click and go <mark style="background-color:purple;">**Miscellaneous -> Data Asset -> Recoil Data**</mark>). This asset contains many sections, and we will cover them one by one.

## Controller Recoil

<figure><img src="/files/H2GjXyCwZkbvO0rdrv4y" alt="" width="427"><figcaption><p>Controller Recoil.</p></figcaption></figure>

* **Horizontal Recoil Step**: a value will be computed in this range and added to the controller Yaw.
* **Vertical Recoil Step**: a value will be computed in this range and added to the controller Pitch.
* **Recoil Smoothing**: interpolation speed for X (Yaw) and Y (Pitch).
* **Damping**: how fast the both Pitch and Yaw will go to zero,
* **Compensation**: how much player input to take into account. 1 - 100%, 0 - 0%.

**Controller Recoil** is added directly to the **Player Controller** using *AddPitchInput* and *AddYawInput* methods.

## Curve

This section contains curves that we covered in the previous chapter:

<figure><img src="/files/c417f6g0rivuA65I6cOi" alt="" width="383"><figcaption><p>Vector curves for translation and rotation,</p></figcaption></figure>

## Input

These properties generate main target recoil values:

<figure><img src="/files/DQW7rwa90PAvMQtK7zl8" alt="" width="563"><figcaption><p>Input properties.</p></figcaption></figure>

* **Pitch/Yaw/Roll Aim**: a value will be generated in this range and added to the pitch/yaw/roll when aiming.
* **Pitch/Yaw/Roll**: a value will be generated in this range and added to the pitch/yaw/roll when hip firing.
* **Kick/Kick R/ Kick Up Aim**: a value will be generated in this range and added in the forward/right/up direction when aiming.
* **Kick/Kick R/ Kick Up**: a value will be generated in this range and added in the forward/right/up direction when aiming.

It's worth noting how the random generation happens in runtime:

* For 2D vectors, it will compute a value via FRandRange(X, Y)
* For 4D vectors, it will compute a value via FRandRange(FRandRange(X, Y), FRandRange(Z, W)). We do it this way to avoid getting close-to-zero values, which sometimes look horrible.

## Smoothing

This group is only applied when auto/burst firing.

<figure><img src="/files/rbLfA5EiG3V9c1ZuAVG1" alt="" width="476"><figcaption><p>Smoothing properties.</p></figcaption></figure>

* **Smooth Rot/Loc**: interpolation speed for a rotation/translation axis. If the value is zero - no interpolation will be applied.
* **Multi Rot/Loc**: multipliers for a rotation/translation axis.
* **Smooth Roll**: if roll sign should change every shot. Keep it true to achieve the best results.

## Noise Layer

This layer applies translation 2D noise in the YZ plane (right and up movement).

<figure><img src="/files/UPI61Dsl8ZhCe0rEve3Z" alt="" width="416"><figcaption><p>Noise properties.</p></figcaption></figure>

* **Noise 2DTarget**: this value will be added to the translation of every shot.
* **Noise 2DAccel**: interpolation speed for right and up axes.
* **Noise 2DZero**: how fast each axis will go to zero.
* **Noise Aim Scalar**: multiplier applied when aiming.

## Pushback

This layer is applied on the second shot of a burst or auto sequence.

<figure><img src="/files/3cetH5ktj2SsVKWc89H9" alt="" width="305"><figcaption><p>Pushback properties.</p></figcaption></figure>

* **Pushback**: this value will be added to the forward translation.
* **Pushback Zero**: how fast the pushback should go to zero.
* **Pushback Accel**: pusback interpolation speed.

## Recoil Sway

This layer applies sway to simulate a body recoil.

<figure><img src="/files/mhNVjnwao1iOUyyTgkMM" alt="" width="533"><figcaption><p>Recoil Sway properties.</p></figcaption></figure>

* **Pitch Sway**: a value will be randomly generated in this range and added to the pitch.
* **Yaw Sway**: a value will be randomly generated in this range and added to the yaw.
* **Roll Sway Multiplier**: will multiply the yaw result by this value and add it to the roll.
* **Damping**: how fast the sway should go to zero.
* **Acceleration**: interpolation sway speed.
* **Ads Scale**: this value will scale the recoil sway when aiming.
* **Pivot Offset**: will offset the recoil physical pivot.

## Timeline

These properties control the general animation timeline.

<figure><img src="/files/Sc8ehwvvcxTV55Pcdyep" alt="" width="291"><figcaption><p>Tineline properties.</p></figcaption></figure>

* **Playback Offset**: will offset the loop time interval. For example, if a weapon fire rate is 600RPM, the loop interval will be 0.1s + Playback Offset.
* **Play Rate**: animation speed multiplier.

## Pivot

This section controls the physical recoil pivot point.

<figure><img src="/files/CCqfbhXdZt0EeUliCuqP" alt="" width="522"><figcaption><p>Pivot settings.</p></figcaption></figure>

* **Pivot Offset**: applied when hip firing.
* **Ads Pivot Offset**: applied when aiming.

{% hint style="success" %}
**Tip**: pivot offsets can be useful when we want to apply recoil rotation around a certain point, like a shoulder.
{% endhint %}
