# 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: 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://malbersanimations.gitbook.io/animal-controller/annex/integrations/astar-pathfinding.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.
