# 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="/files/4gL18aaCxaefzm38vPxx" 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.


---

# 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/workflow/playing-animations.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.
