# 02 Behavior Tree Task

A standard BT task that drives the AI along the OWP network.

## Where to find it

In your Behavior Tree, right-click → New Task → **OWP Move To**.

## Properties

| Property                    | What it does                                              |
| --------------------------- | --------------------------------------------------------- |
| **Target Actor Key**        | Blackboard key (Object) — preferred goal.                 |
| **Target Location Key**     | Blackboard key (Vector) — fallback if actor key is empty. |
| **Step Distance**           | Distance between waypoints along splines. Default 200.    |
| **Acceptance Radius**       | Radius for intermediate waypoints. Default 50.            |
| **Final Acceptance Radius** | Radius for the final destination. Default 100.            |

## Behavior

* Reads the target from blackboard (Actor preferred, Location fallback).
* Runs A\* via the subsystem.
* Drives the pawn along the splines.
* Returns **Succeeded** on arrival, **Failed** if pathfinding fails or the task is aborted.

## When to use it

* Your AI uses a behavior tree (most production AI does).
* You want decorators / observers to interrupt movement (enemy spotted, low health, etc.).
* You want abort flow handled by the BT framework.

## Tips

* Combine with a **Wait** decorator so the BT can react during long moves.
* Use a **service** to refresh the target every few seconds if the goal moves.
* Tune **Final Acceptance Radius** higher when the destination is "near a building" rather than a precise point.


---

# 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://onesteppack.gitbook.io/openworldnavigation-doc/04-ai-movement/02-behavior-tree-task.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.
