# AI Target

## Overview

The Ai Target component is used to let the AI Animal know what is the Stopping distance of a target. When a transform is assigned as the target to follow, it will use the AI Target **Stopping distance** instead of the AI Animal Control[ **Default Stopping Distance**](https://malbersanimations.gitbook.io/animal-controller/main-components/ai-animal-control#stopping-distance)**.**

<figure><img src="https://963537199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lzhr1XSMzMqNXjRnNlb%2Fuploads%2FFhKrWPfiZ8xRKfqCXJjb%2Fimage.png?alt=media&#x26;token=09000b75-9807-4f43-94e0-63c85ae5ec5a" alt=""><figcaption></figcaption></figure>

This is used to differentiate animals by its size. For example, a larger animal may have a larger stopping distance and therefore requires an override by using this component.

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-MZG4cAwUYXBEfS_2wVt%2F-MZG5Gut90bTviZ39QFj%2Fimage.png?alt=media\&token=a7baac73-bb08-446e-bf55-0af5cfb0e4e9)

<figure><img src="https://963537199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lzhr1XSMzMqNXjRnNlb%2Fuploads%2F1iBoQcZImHfZn2k3Xxpm%2FUnity_lAz9tZTOvU.gif?alt=media&#x26;token=3f2e2a36-3579-44a6-913d-fcecb0c9f196" alt=""><figcaption></figcaption></figure>

## Parameters

### Point Type

Is the Ai Target on the ground, water,  air or underwater

### Stopping Distance

Distance for AI driven animals to stop when it has arrived to the gameobject when is set as a Target.

### Slowing Distance

Distance for AI driven animals to start slowing it's speed when arriving to this gameobject. If set to 0 or lesser than the stopping distance, the slowing movement logic is ignored.

### Center

Offset to correct the center position of the gameobject.

### Height

Default height for the waypoints

### Arrive Look At

When the animal arrives to the target, do we rotate the animal so that it looks at the center of the AI target?

<figure><img src="https://963537199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lzhr1XSMzMqNXjRnNlb%2Fuploads%2FI7EK7yUlHVaNceAU53tB%2FUnity_HsISKY2DVV.gif?alt=media&#x26;token=63cfeb58-631c-4f8f-b521-7ca68b0f6559" alt=""><figcaption><p>If the AI Animal is inside the Stopping distance radius then it will turn to see the Target.</p></figcaption></figure>

## Events

### On Target Arrived

Invoked when the target arrives to this gameobject
