> For the complete documentation index, see [llms.txt](https://kinemation.gitbook.io/scriptable-animation-system/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/scriptable-animation-system/recoil-system/camera-shake.md).

# Camera Shake

**Camera Shake** is an important aspect of the camera animation in game. The **FPS Animation Framework** allows you to play the camera shakes in runtime, by simply accessing the **FPSCamera** component:

```csharp
_fpsCameraController.PlayCameraShake(cameraShake);
```

The cameraShake parameter is a Scriptable Object, which you can create by right-clicking:

<mark style="background-color:purple;">**Create -> KINEMATION -> FPS Animator General -> Camera Shake**</mark>

<figure><img src="/files/7wbDugy2gfbTYJpnt7Nh" alt="" width="376"><figcaption><p>Camera Shake.</p></figcaption></figure>

**X, Y and Z** are animation curves, which animate the respective rotation axis.

**Pitch, Yaw and Roll** represent the ranges for minimum and maximum target values. The value is computed using this formula:

```csharp
public static float GetTarget(Vector4 value)
{
    float a = Random.Range(value.x, value.y);
    float b = Random.Range(value.z, value.w);
    return Random.Range(0, 2) == 0 ? a : b;
}
```

**Smooth Speed** defines the interpolation speed.

**Play Rate** defines the animation speed.
