# Wander Area

## Overview

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

The wander area is a improved version of the Waypoint. the Difference is that it uses an Area to find the next position to go to, and it can transition to itself

{% embed url="<https://streamable.com/ogp1fz>" %}

{% hint style="info" %}
You can also use nested wander areas to have different shapes besides Box and Circle
{% endhint %}

<figure><img src="/files/jri9UPcuQ2VoKf3aCZNb" alt=""><figcaption><p>Nested wander area's</p></figcaption></figure>

## How to use it

Add the Wander Area to your AI Control Target Parameter and that should be it.

{% embed url="<https://streamable.com/n1mjs2>" %}

## Parameters

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

### Point Type

This will establish if this area is on the Ground, Air, Water, or Underwater. Air types will activate the Fly State, UnderWater will activate the underwater State.

### Height

Default height for the waypoints. This parameter is used for the Look At Decision in the Brain Component. So the LookAt Ray is not pointing directly to the ground.

### Stopping Distance

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

### Slowing Distance

Distance to start slowing its speed when arriving to this gameobject. If set to 0 or lower than the stopping distance, the slowing movement logic will be ignored

### Wait Time

Maximum and Minimum wait time needed to wait before choosing the next waypoint

### Area Type

Use a Circle or a Box area.

### Radius (For Circle)

Radius of the circle area

### Box Area (For Box)

A Vector3 which determines the box dimensions

### Wander Weight

Probability of keep wondering on this same Wander Area. Meaning the next waypoint will be itself.

### Next Waypoints

List of next waypoints to go to.

## Events

### On Target Arrived

Invokes when a target arrives to this wander area


---

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