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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kinemation.gitbook.io/scriptable-animation-system/recoil-system/camera-shake.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
