> 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/main-components/ai/mwaypoint.md).

# MWayPoint

## Overview

This component is used by AI Animal Control to assign new targets to follow. the difference between AI Target and this component is once the AI animal arrives. it can wait for a period of time and select a new target to follow from the Next Waypoint list.

<figure><img src="/files/4odg1iC99QVwhNPH5LnD" alt=""><figcaption></figcaption></figure>

This component inherits from the [**AI Target**](/animal-controller/main-components/ai/ai-target.md) component.

## Parameters

### Point Type

Type of waypoint. This is used for the Animal to identify if the waypoint is in water,  in air, or on the ground, so he can properly use Locomotion, Swim, or Fly states.

### Height

The height is used on the Brain Component. This allows the Look At Decision to use an Offset in the Y-Axis when casting the Look Ray.  That way the Ray does not hit the ground when A waypoint is the Target of an AI Animal.

### Stopping Distance

Min Distance that the Ai Animal will stop when Arrives at the waypoint.

### Min Wait Time

Minimum wait time needed to wait before choosing the next waypoint

### Max Wait Time

Minimum wait time needed to wait before choosing the next waypoint

### Debug Color

Changes the color of the Debug Radius.

### Create Next Waypoint

It creates automatically a duplicated Waypoint and set it as the next waypoint.

![](/files/-MYrDJS9121EQIvl7v46)

### Next Waypoint List

Array of transform waypoints the animal can go next. When the animals arrives to the waypoint, the next one will be chosen randomly from this list.

### OnTarget Arrived (GameObject)

This event is invoked when the AI Animal arrives to the waypoint. It sends as a parameter the GameObject of the AI Animal.


---

# 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/main-components/ai/mwaypoint.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.
