> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/improve-performance-tricks.md).

# Improve Performance Tricks

Let's try some tricks to improve performance on when using the Animal Controller and Horse Animset Pro.

## Removing/Disable unnecessary State&#x20;

Remove or disable states NPCs will not use (Fly, Climb, Fall, Jump, Swim). If they are only going to move around (Keeping **Idle** and **Locomotion** will do the trick). This will ignore all the unnecessary Raycasting from automatic States like **Fall** and **Swim** (They are constantly checking if the character is grounded or if there's a water source)

<figure><img src="/files/PMjZuTp8wrsDWF99k0GA" alt="" width="563"><figcaption></figcaption></figure>

## Increasing State Try Loop&#x20;

Changing Loop Cycle of the States..Some automatic states (**Swim**, **Grab Ledge**, **Fall**) are calculated in every frame you can increase the value to skip some frames.

<figure><img src="/files/yFZdHAugkJhR3wEOieRE" alt="" width="563"><figcaption></figcaption></figure>

## Disabling **OnTrigger Enter** - **On Trigger Exit functions**

NPCs should not be using these Unity functions to check if there are any interactions around them. Only the necessary ones should be included. This may drop the performance. This includes things like Zones inside NPCs or the TriggerProxy Component.

<figure><img src="/files/GvQaC58q8hJiKhLMLgpu" alt=""><figcaption><p>These Prefabs should be only use for the player.</p></figcaption></figure>

## Sound and Effects

AC does not have any optimized code for Audio clips... I just play an audio clip in an audio source. Unless is really necessary to play audio on an **NPC**,  you can disable the sounds too. This includes the  FootSteps.

<figure><img src="/files/EJ0Ae9RcWXs0WONzvamW" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/improve-performance-tricks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
