> 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/annex/integrations/astar-pathfinding.md).

# AStar Pathfinding

## Asset Location

{% hint style="info" %}

## [A\* Pathfinding](https://assetstore.unity.com/packages/tools/ai/a-pathfinding-project-pro-87744?aid=1100lHT6)

{% endhint %}

{% hint style="success" %}

### *Remember to have both packages on your project installed correctly*

{% endhint %}

## Integration package

After having both AC and A\*Pathfinding in your project. Install the integration package.

{% file src="/files/7HK86pxHdmGgbZGG2v0h" %}
\<Latest version>
{% endfile %}

{% file src="/files/0QMD9xmoBMALaI9oodrG" %}

{% file src="/files/2ghWvcRY7iHlkfn2oFql" %}

{% file src="/files/r0EILM7ZlqQzt8wSGmz9" %}

## Steps

1.- On your scene, make sure you are using Recast Graph, since it's the graph that has Offmeshlinks the Animal Controller can use to move off meshes.

![](/files/UpQqvm9WbNpdgzPCyOLG)

1.-    Select any of your animals and unpack the prefab. That way you can remove the **Animal AI Control**, and replace it with the **AIControl (A\*)** Component. Remove also the **Unity NavMeshAgent** component.

![](/files/w6BLERkIAQeMZ36OqNrq)

&#x20;This will add automatically the Seeker and the RichAI components from A\*Pathfinding.

2.- Add the A\*Modifiers you need to improve the Pathfinding on your AI

And that's it :)


---

# 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/annex/integrations/astar-pathfinding.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.
