> For the complete documentation index, see [llms.txt](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/getting-started/included-demo-scenes/fleeing-demo.md).

# Fleeing Demo

## Fleeing Demo

The Fleeing Demo shows an AI fleeing from the camera. The AI will flee in the opposite direction of its current target. If it gets near an edge, it will generate a new destination to avoid getting stuck. This is done using the Coward Behavior set through the [Behavior Component](/emerald-ai-wiki/emerald-components-required/behaviors-component.md). While demo is shown with an NPC-like AI, it can certainly be used for things like animal AI.

{% hint style="info" %}
**Note:** The camera can be controlled with the mouse and moved with the w, a, s, and d keys.
{% endhint %}

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