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

# ➕Integration

> In this section we will learn how to integrate the system.

**FPS Animation Framework** offers a streamlined integration process. Let's start with the custom controller integration. We will use the FPSController script from the demo project as an example.

## Initialization

First, you need to add references to the framework core components:

```text theme={null}
private FPSAnimator _fpsAnimator; // Central management component.
private UserInputController _userInput; // Dynamic input system.
private FPSCameraController _fpsCamera; // Camera system.
private IPlayablesController _playablesController; // Dynamic animation system.
private RecoilAnimation _recoilAnimation; // Recoil effect component.
```

Then, make sure to initialize all the components:

```text theme={null}
_fpsAnimator = GetComponent<FPSAnimator>();
_fpsAnimator.Initialize();
_userInput = GetComponent<UserInputController>();
_fpsCamera = GetComponentInChildren<FPSCameraController>();
_playablesController = GetComponent<IPlayablesController>();
_recoilAnimation = GetComponent<RecoilAnimation>();
```

<Warning>
  **Note**: make sure to initialize the **FPS Animator** component!
</Warning>

## Updating Input

When updating user input, we typically need to refresh aiming and movement inputs:

## Weapon change

When switching weapons, we need to link a new Animator Profile:

## Aiming

Additionally, we access the **FPSCameraController**, and adjust the target FOV. We also adjust the recoilAnimation aiming status, which is important as it will adjust the animation accordingly.

## Playing animations

To play an animation from code, you need to call the:

You can also specify the start time of the animation as a second parameter, which might be useful for mechanics like staged reloads.

## Recoil

The recoil is implemented via **Recoil Animation** component and **Camera Shakes**. First, we need to initialize the Recoil Animation component when a gun is equipped:

You only need to add the **Recoil Data** to your custom weapon class. The Recoil Data is a Scriptable Object, that contains the information about the procedural recoil animation.

Next, we need to apply the recoil effect in runtime:

## Making adjustments

Sometimes it is necessary to adjust our system's behavior in runtime, depending on gameplay situations.

In the **FPS Animation Framework** it is implemented primarily via the Input System:

In the example above, we toggle the Playables systems and stabilization based on the sprinting status. You can adjust custom properties in a similar way, depending on the requirements of your project.

***

At this point, the integration is complete. In the next section, we will learn more about dynamic animations.
