---
description: In this section we will find out how to play custom animations in runtime.
---

# Playing Animations

## Animation Asset

The **FPS Animation Framework** uses Animation Assets to play custom animations on your character from code. To create a new asset, right-click and go to <mark style="background-color:purple;">**Create/KINEMATION/FPS Animator General/Animation Asset**</mark>:

<figure><img src="https://784345943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxcUmJ78NSw1bSUlSO9oP%2Fuploads%2FXFzs9kLR4Ajp1lJlRoTj%2Fimage.png?alt=media&#x26;token=b94d26c3-8c6d-4084-b624-c4234b337430" alt="" width="411"><figcaption></figcaption></figure>

First, you must specify the **Rig Asset** - it will be used to pick the curve names via a popup widget. Then, make sure to assign the actual Animation Clip.

* **Mask** property is optional, but you can use it if you need to affect a specific part of the body.
* **Override Mask** and **Is Additive** are used for shared animations, like emotes, grenade throws, etc. The **Override Mask** will make the left arm use absolute animation, while the right arm will only use additive motion.
* **Blend Time** controls the transition for your animation. The **Rate Scale** is a playback speed multiplier.
* The **Curves** list defines custom curves, which will be used in this animation. This is an extremely useful feature when you want custom animations to control animation features.

{% hint style="success" %}
**Example:** let's say we want to disable left-hand IK when reloading. Add the MaskAttachHand curve to the animation, set its value to 1. Now we can use this curve as a mask parameter in the left-hand IK layer, which will blend it out when the animation is playing.
{% endhint %}

## Code

To play an Animation Asset from code, you need to call the PlayAnimation method on the **IPlayablesController**:

```csharp
// Where yourAnimation is an Animation Asset.
// Second parameter is the start time.
_playablesController.PlayAnimation(yourAnimation, 0f);
```

***

In the next section, we will learn how to create custom animation features.
