Логотип Ue Ai And Navigation

Ue Ai And Navigation

Сообщество
kevinpbuckley
ue-ai-and-navigation

Build AI in Unreal — AIController-driven pawns, Behavior Trees and Blackboards (tasks, decorators, services), the navigation system and NavMesh (MoveTo pathfinding, NavMeshBoundsVolume, NavAreas, avoidance), the Environment Query System (EQS generators, tests, C++ FEnvQueryRequest), AI Perception (sight/hearing/damage senses, ConfigureSense, OnTargetPerceptionUpdated), and StateTree (UStateTreeAIComponent). Use when creating enemy/NPC behavior, pathfinding/movement to targets, decision-making logic, environment queries for cover/flanking/positions, sensing the player, or replacing Behavior Trees with StateTree.

Add to TypingMind

Обзор

Издательkevinpbuckley
Репозиторийunreal-engine-skills
Название навыкаue-ai-and-navigation
Звёзды
89
Форки
9
Файлы в комплекте
4
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 4

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — kevinpbuckley. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Ue Ai And Navigation в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-ai-and-navigation
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/unreal-engine-skills.git /tmp/unreal-engine-skills
mkdir -p .claude/skills
cp -r /tmp/unreal-engine-skills/skills/core/ue-ai-and-navigation .claude/skills/ue-ai-and-navigation
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Ue Ai And Navigation в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Ue Ai And Navigation, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Ue Ai And Navigation не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

AI & navigation

Unreal AI = an AIController possessing a pawn, deciding what to do (usually via a Behavior Tree reading a Blackboard), moving via the navigation system (NavMesh pathfinding), optionally sensing the world with AI Perception, and querying it with EQS. StateTree offers a modern alternative or complement to Behavior Trees.

When to use this skill

  • Enemy/NPC behavior: patrol, chase, attack, flee, investigate.
  • Moving an AI to a location or actor with real pathfinding.
  • Decision logic and working memory (Behavior Tree + Blackboard).
  • Finding good positions — cover, flanking, best attack point — via EQS.
  • Sensing the player (sight, hearing, damage) and reacting to stimuli.
  • Replacing or complementing Behavior Trees with StateTree for hierarchical state machines.

System map

SystemKey typesModule / Plugin
AI controllerAAIController, UBrainComponentAIModule
Behavior TreeUBehaviorTree, UBTTaskNode, UBTDecorator, UBTServiceAIModule
BlackboardUBlackboardComponent, UBlackboardDataAIModule
NavigationUNavigationSystemV1, ARecastNavMesh, ANavMeshBoundsVolumeNavigationSystem
Path followingUPathFollowingComponentAIModule
EQSUEnvQueryManager, FEnvQueryRequest, UEnvQueryAIModule
AI PerceptionUAIPerceptionComponent, UAISenseConfig_Sight/Hearing/DamageAIModule
StateTree (AI)UStateTreeAIComponent, UStateTreeGameplayStateTree plugin

Build dependencies: add "AIModule" and "NavigationSystem" to PublicDependencyModuleNames in your .Build.cs. For StateTree add "GameplayStateTree" and "StateTreeModule".

AIController + possession

cpp
// MyAIController.h
UCLASS()
class MYGAME_API AMyAIController : public AAIController
{
    GENERATED_BODY()
public:
    virtual void OnPossess(APawn* InPawn) override;
protected:
    UPROPERTY(EditDefaultsOnly, Category="AI")
    TObjectPtr<UBehaviorTree> BehaviorTree;
};

// MyAIController.cpp
void AMyAIController::OnPossess(APawn* InPawn)
{
    Super::OnPossess(InPawn);    // AController::OnPossess links the pawn
    if (BehaviorTree)
        RunBehaviorTree(BehaviorTree);  // initializes Blackboard then starts BT
}

On the pawn (or its Blueprint):

  • AIControllerClass = AMyAIController::StaticClass()
  • AutoPossessAI = EAutoPossessAI::PlacedInWorldOrSpawned

RunBehaviorTree is declared at AIController.h:262. It also sets bStartAILogicOnPossess (line 98) which auto-starts the BT when possessed. In server-only AI, the controller only exists on the server; guard client-side calls.

Behavior Trees & Blackboard

The Blackboard (UBlackboardData asset + UBlackboardComponent runtime) is the AI's working memory — typed key/value pairs (Object, Vector, Bool, Float, Int, Name, Enum).

cpp
// Write a key from C++ (controller or task):
if (UBlackboardComponent* BB = GetBlackboardComponent())
{
    BB->SetValueAsObject(TEXT("TargetActor"), Player);    // BlackboardComponent.h:133
    BB->SetValueAsBool(TEXT("bCanSeePlayer"), true);      // line 148
    BB->SetValueAsVector(TEXT("LastKnownLocation"), Loc); // line 157
}

Tree structure:

  • Composites — Selector (try children left to right, succeed on first success) / Sequence (run all children; fail on first failure) / SimpleParallel.
  • Tasks (UBTTaskNode) — leaf nodes that do work (ExecuteTask → return EBTNodeResult::Succeeded/Failed/InProgress; call FinishLatentTask for async).
  • Decorators (UBTDecorator) — conditions attached to a node or branch; override CalculateRawConditionValue; can abort running branches via FlowAbortMode.
  • Services (UBTService) — tick periodically while their branch is active; use TickNode to poll and update the Blackboard (e.g. refresh TargetActor).

Custom task pattern:

cpp
UCLASS()
class UBTTask_FindCover : public UBTTaskNode
{
    GENERATED_BODY()
    virtual EBTNodeResult::Type ExecuteTask(
        UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
};

EBTNodeResult::Type UBTTask_FindCover::ExecuteTask(
    UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
{
    // Run an EQS query, set a Blackboard key, return Succeeded.
    // For async work: kick off query, return InProgress,
    // then call FinishLatentTask(OwnerComp, EBTNodeResult::Succeeded) in the callback.
    return EBTNodeResult::Succeeded;
}

See references/behavior-tree-deep-dive.md for the full instancing model, node memory, composite abort modes, and service intervals.

Navigation & movement

cpp
// Issue movement from the AIController:
MoveToActor(TargetActor, /*AcceptanceRadius*/ 50.f);      // AIController.h:172
MoveToLocation(Destination, 50.f);                         // AIController.h:187

// React to completion:
virtual void OnMoveCompleted(FAIRequestID RequestID,
    const FPathFollowingResult& Result) override;           // AIController.h:230
// Or bind the dynamic delegate:
ReceiveMoveCompleted.AddDynamic(this, &AMyCtrl::OnMoveDone); // AIController.h:240

Setup checklist:

  1. Place a NavMeshBoundsVolume in the level — the ARecastNavMesh is auto-created inside it.
  2. Press P in the viewport to visualize coverage. Rebuild nav if geometry changed.
  3. The pawn needs a UCharacterMovementComponent (or equivalent); the nav system computes the path, the movement component follows it via UPathFollowingComponent.

Modifying the mesh: UNavArea subclasses set traversal cost; UNavModifierComponent / ANavModifierVolume apply areas at runtime. Two avoidance methods: RVO (Reciprocal Velocity Obstacles, lightweight, per-agent) and Detour Crowd (UDetourCrowdAIController, shared path following with group-aware steering).

For open worlds with World Partition, use Navigation Invokers (UNavigationInvokerComponent) so the nav mesh generates only around agents rather than over the whole level.

See references/navigation-deep-dive.md for nav areas, query filters, avoidance, nav links, and World Partition nav.

EQS (Environment Query System)

EQS runs a query (generators + tests) to score and rank candidate locations or actors, then returns the best match. Common uses: "best cover from player", "nearest flanking position", "closest visible health pickup".

Run from C++:

cpp
// In an AIController or BT task:
FEnvQueryRequest Request(CoverQuery, this); // EnvQueryManager.h:80
Request.Execute(EEnvQueryRunMode::SingleResult, this,
    &AMyAIController::OnCoverQueryFinished); // EnvQueryManager.h:97-106

void AMyAIController::OnCoverQueryFinished(
    TSharedPtr<FEnvQueryResult> Result)
{
    if (Result.IsValid() && Result->IsSuccessful())
    {
        FVector BestLoc = Result->GetItemAsLocation(0);
        if (UBlackboardComponent* BB = GetBlackboardComponent())
            BB->SetValueAsVector(TEXT("MoveToLocation"), BestLoc);
    }
}

FQueryFinishedSignature is declared in EnvQueryManager.h. Enable EQS in Project Settings → AI → Enable EQS. The EQS Testing Pawn (AEQSTestingPawn) lets you visualize query results in the editor viewport without running the game.

See references/eqs-deep-dive.md for generators, tests, custom contexts, and the instanced C++ query pattern.

AI Perception

UAIPerceptionComponent (on the AIController) acts as a stimuli listener. Add sense configs in the constructor:

cpp
// In AIController constructor:
PerceptionComp = CreateDefaultSubobject<UAIPerceptionComponent>(TEXT("PerceptionComp"));

auto SightConfig = CreateDefaultSubobject<UAISenseConfig_Sight>(TEXT("SightConfig"));
SightConfig->SightRadius = 2000.f;
SightConfig->LoseSightRadius = 2500.f;
SightConfig->PeripheralVisionAngleDegrees = 60.f;
SightConfig->DetectionByAffiliation.bDetectEnemies = true;
SightConfig->DetectionByAffiliation.bDetectNeutrals = true;
PerceptionComp->ConfigureSense(*SightConfig);    // AIPerceptionComponent.h:319
PerceptionComp->SetDominantSense(SightConfig->GetSenseImplementation());

Bind the update delegate in BeginPlay:

cpp
PerceptionComp->OnTargetPerceptionUpdated.AddDynamic(
    this, &AMyAIController::OnTargetPerceptionUpdated); // AIPerceptionComponent.h:423

void AMyAIController::OnTargetPerceptionUpdated(AActor* Actor, FAIStimulus Stimulus)
{
    if (UBlackboardComponent* BB = GetBlackboardComponent())
    {
        BB->SetValueAsBool(TEXT("bCanSeePlayer"),
            Stimulus.WasSuccessfullySensed());
        if (Stimulus.WasSuccessfullySensed())
            BB->SetValueAsObject(TEXT("TargetActor"), Actor);
    }
}

For targets to be perceivable, add UAIPerceptionStimuliSourceComponent to them and register the relevant senses. Affiliations (enemy/neutral/friendly) are set via IGenericTeamAgentInterface — Blueprint-only projects detect neutrals then filter by tag.

See references/perception-and-statetree.md for all senses, forget behavior, UAIPerceptionStimuliSourceComponent, and debugging.

StateTree (modern alternative to Behavior Trees)

StateTree (Plugins/Runtime/StateTree, Plugins/Runtime/GameplayStateTree) is a hierarchical state machine that combines BT-style selectors with explicit state transitions. It is the current direction for new Epic AI work (used in Lyra, City Sample).

For AI use, add UStateTreeAIComponent (subclass of UStateTreeComponent) to the AIController instead of RunBehaviorTree:

cpp
// In AIController constructor:
StateTreeComp = CreateDefaultSubobject<UStateTreeAIComponent>(TEXT("StateTreeComp"));
// Assign a UStateTree asset via UPROPERTY or in the Blueprint details panel.

UStateTreeAIComponent is declared in Plugins/Runtime/GameplayStateTree/Source/GameplayStateTreeModule/Public/Components/StateTreeAIComponent.h and derives from UBrainComponent, so StartLogic/StopLogic/RestartLogic work the same way as with UBehaviorTreeComponent.

StateTree tasks are C++ structs (not UObjects) implementing FStateTreeTaskBase — lighter weight and data-oriented. State data lives in typed instance structs. For Behavior Tree projects, StateTree can be adopted incrementally — the two systems coexist.

See references/perception-and-statetree.md for StateTree C++ task authoring, schema setup, and the BT-vs-StateTree decision guide.

Gotchas

  • No NavMeshBoundsVolume or unbuilt navmesh — MoveTo fails silently; check nav coverage with P in the editor, rebuild if geometry changed post-load.
  • AutoPossessAI not set — the controller never possesses; no brain runs.
  • Pawn without a movement component — the path is computed but the pawn cannot follow it.
  • RunBehaviorTree called before a valid UBlackboardData is set on the tree asset — the BT initializes but blackboard keys resolve to defaults silently.
  • Custom BT task not instanced, modifying this in ExecuteTask — non-instanced nodes are shared across all AI using the same tree; store runtime state in NodeMemory only (or mark the node UCLASS(meta=(DisplayName="..."), Blueprintable) with instancing).
  • Binding OnPerceptionUpdated vs OnTargetPerceptionUpdated — the former delivers an array of all updated actors each tick; the latter fires per actor per stimulus. Prefer the latter for precise reaction logic.
  • EQS not enabled in Project Settings — queries silently produce no results.
  • Using tick-polling instead of perception events — costly and less reliable; always respond to OnTargetPerceptionUpdated.
  • Hardcoding positions instead of EQS — brittle; EQS respects nav mesh reachability.
  • Forgetting ReceiveMoveCompleted — if you call StopMovement before checking the result, the delegate fires immediately with EPathFollowingResult::Aborted.

Version notes

  • StateTree is available since UE 5.1 (early), production-stable in UE 5.3+. Use UStateTreeAIComponent (UE 5.4+) for AI-controller-hosted trees. Prior to 5.4 use UStateTreeComponent directly.
  • FEnvQueryRequest::Execute template API is stable across UE5. The older UEnvQueryManager::RunQuery overloads also exist and behave the same.
  • OnTargetPerceptionInfoUpdated (delivers FActorPerceptionUpdateInfo) was added in UE 5.1 as a richer alternative to OnTargetPerceptionUpdated.

References & source material

Engine source (UE 5.8, under Engine/Source/Runtime/):

  • AIModule/Classes/AIController.h — AAIController:87, MoveToActor:172, MoveToLocation:187, OnMoveCompleted:230, ReceiveMoveCompleted:240, RunBehaviorTree:262, OnPossess:351, GetBlackboardComponent:451.
  • AIModule/Classes/BehaviorTree/BehaviorTreeComponent.h — UBehaviorTreeComponent:104, StartTree:137, StopTree:140, RestartTree:146.
  • AIModule/Classes/BehaviorTree/BTTaskNode.h — UBTTaskNode:33, ExecuteTask:40, AbortTask:48, FinishLatentTask:80.
  • AIModule/Classes/BehaviorTree/BTDecorator.h — UBTDecorator:37, CalculateRawConditionValue:121, FlowAbortMode:98.
  • AIModule/Classes/BehaviorTree/BTService.h — UBTService:34, Interval:52.
  • AIModule/Classes/BehaviorTree/BlackboardComponent.h — UBlackboardComponent:42, SetValueAsObject:133, SetValueAsBool:148, SetValueAsVector:157, GetValueAsObject:103, RegisterObserver:73.
  • AIModule/Classes/EnvironmentQuery/EnvQueryManager.h — FEnvQueryRequest:70, FEnvQueryRequest::Execute:97, UEnvQueryManager:207, RunQuery:223, RunInstantQuery:238, RunEQSQuery (static):279.
  • AIModule/Classes/Perception/AIPerceptionComponent.h — UAIPerceptionComponent:208, SensesConfig:219, ConfigureSense:319, ForgetAll:346, GetCurrentlyPerceivedActors:372, OnPerceptionUpdated:396, OnTargetPerceptionUpdated:423.
  • AIModule/Classes/Perception/AISenseConfig_Sight.h — UAISenseConfig_Sight:18, SightRadius:28, LoseSightRadius:32, PeripheralVisionAngleDegrees:37.
  • AIModule/Classes/Navigation/PathFollowingComponent.h — UPathFollowingComponent:216, RequestMove:248.
  • NavigationSystem/Public/NavigationSystem.h — UNavigationSystemV1:291, GetNavigationSystem:502, FindPathToLocationSynchronously:535, FindPathToActorSynchronously:541.
  • NavigationSystem/Public/NavMesh/RecastNavMesh.h — ARecastNavMesh:571.

Plugins (UE 5.8, under Engine/Plugins/Runtime/):

  • StateTree/Source/StateTreeModule/Public/StateTree.h — UStateTree asset.
  • GameplayStateTree/Source/GameplayStateTreeModule/Public/Components/StateTreeAIComponent.h — UStateTreeAIComponent:16.
  • GameplayStateTree/Source/GameplayStateTreeModule/Public/Components/StateTreeComponent.h — UStateTreeComponent:39, StartLogic:54, StopLogic:56.

Official docs (UE 5.8):

Deep-dive references in this skill:

Related skills: ue-character-and-movement, ue-gameplay-tags, ue-gameplay-framework.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Ue Ai And Navigation?

Build AI in Unreal — AIController-driven pawns, Behavior Trees and Blackboards (tasks, decorators, services), the navigation system and NavMesh (MoveTo pathfinding, NavMeshBoundsVolume, NavAreas, avoidance), the Environment Query System (EQS generators, tests, C++ FEnvQueryRequest), AI Perception (sight/hearing/damage senses, ConfigureSense, OnTargetPerceptionUpdated), and StateTree (UStateTreeAIComponent). Use when creating enemy/NPC behavior, pathfinding/movement to targets, decision-making logic, environment queries for cover/flanking/positions, sensing the player, or replacing Behavior...

Зачем использовать Ue Ai And Navigation в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Ue Ai And Navigation — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Ue Ai And Navigation в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-ai-and-navigation. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Ue Ai And Navigation?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Ue Ai And Navigation?

С любым количеством. В TypingMind вы можете использовать Ue Ai And Navigation с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Ue Ai And Navigation?

Навык опубликован на GitHub. Издатель — kevinpbuckley. Условия лицензии можно найти в репозитории. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇