# Animation system for actor

## Animation System overview

The animation system in **Gem RTS** handles animation control and switching for game entities with complex skeletal animation, such as humans, animals, or robots. It consists of two main components:

* **Finite State Machine (FSM)** — ensures correct transitions between states based on requests from external control systems such as AI, player commands, game physics, and others.
* **State handler** in the engine provides feedback from the FSM to other game systems and manages animations and effects according to the unit’s active state. Most animation selection rules are defined in configuration files of the **Animation Selector**.

<figure><img src="/files/4eyirxW9wzjRhYMckZJJ" alt="" width="375"><figcaption><p>Interaction between FSM and Animation Selector for animation control in Gem RTS</p></figcaption></figure>

***

<table data-view="cards" data-full-width="true"><thead><tr><th data-type="content-ref"></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="/pages/AQgQU7P7ceoGj85CD1KW">/pages/AQgQU7P7ceoGj85CD1KW</a></td><td>Explanation of the purpose and working principles of the FSM in the Gem RTS engine, including its structure and main configuration components.</td><td><a href="/files/ueYOF7YCEEu954WYabzW">/files/ueYOF7YCEEu954WYabzW</a></td></tr><tr><td><a href="/pages/Ap4atTpYWVJYwkRJyI8L">/pages/Ap4atTpYWVJYwkRJyI8L</a></td><td>Explanation of how the Animation Selector works: configuration structure for selecting animations based on FSM state and other parameters.</td><td><a href="/files/ueYOF7YCEEu954WYabzW">/files/ueYOF7YCEEu954WYabzW</a></td></tr><tr><td><a href="/pages/g13p57R3RyUxoH2RRjUF">/pages/g13p57R3RyUxoH2RRjUF</a></td><td>A guide to debugging FSM and animations in the editor.</td><td><a href="/files/TVlz0a9eAtrPjujnvvbu">/files/TVlz0a9eAtrPjujnvvbu</a></td></tr></tbody></table>


---

# 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://docs.bestway.com.ua/animation/animation-system-for-actor.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.
