ue-ai-navigation

Use this skill when implementing AI, AIController, behavior tree, blackboard, AI perception, NavMesh, EQS, navigation, pathfinding, State Tree, or Smart Objects in Unreal Engine. See references/behavior-tree-patterns.md for BT patterns and references/eqs-reference.md for EQS configuration. For AI ab

By quodsoler · 811 installs

npx skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation

Source repository · Upstream listing

UE AI and Navigation You are an expert in Unreal Engine's AI and navigation systems. Context Read .agents/ue project context.md for project AI plugins, subsystem configs, enabled modules (AIModule, NavigationSystem, GameplayStateTreeModule, SmartObjectsModule), and existing AI frameworks. Information Gathering Before implementing, clarify: AI complexity, navigation needs (ground/fly/swim, dynamic obstacles, streaming), perception senses required, Behavior Tree vs. State Tree preference, multiplayer authority model, and agent count for budget planning. AI Architecture Build.cs modules : AIModule , NavigationSystem , GameplayTasks AIController Key AAIController API On Pawn : AIControllerClass = AMyAIController::StaticClass(); AutoPossessAI = EAutoPossessAI::PlacedInWorldOrSpawned; Blackboard Type Get Set Object GetValueAsObject SetValueAsObject Vector GetValueAsVector SetValueAsVector Bool GetValueAsBool SetValueAsBool Float GetValueAsFloat SetValueAsFloat Int GetValueAsInt SetValueAsInt Enum GetValueAsEnum SetValueAsEnum Name GetValueAsName SetValueAsName Rotator GetValueAsRotator SetValueAsRotator String GetValueAsString SetValueAsString Class GetValueAsClass SetValueAsClass Mark keys Instance Synced to share values across all AI using the same UBlackboardData (squad wide alerts via UAISystem propagation). Behavior Tree Nodes Custom Task Custom Decorator Custom Service Built in Nodes (reference) Tasks : BTTask MoveTo , BTTask MoveDirectlyToward , BTTask Wait , BTTask WaitBlackboardTime , BTTask RunEQSQuery , BTTask PlayAnimation , BTTask MakeNoise , BTTask RotateToFaceBBEntry , BTTask RunBehavior , BTTask RunBehaviorDynamic , BTTask FinishWithResult Decorators : BTDecorator Blackboard , BTDecorator CompareBBEntries , BTDecorator Cooldown , BTDecorator TagCooldown , BTDecorator Loop , BTDecorator TimeLimit , BTDecorator DoesPathExist , BTDecorator IsAtLocation , BTDecorator CheckGameplayTagsOnActor , BTDecorator ForceSuccess Composites : Selector (first success), Sequence (first failure), SimpleParallel (main task + background subtree; main task drives completion). UE does not ship a general purpose Parallel node — SimpleParallel is the built in option. For true parallel execution of N branches, implement a custom UBTCompositeNode or chain multiple SimpleParallel nodes. AI Perception Additional sense configs: UAISenseConfig Touch (fires on physical contact with perceived actor), UAISense Team (propagates enemy awareness across teammates via IGenericTeamAgentInterface ), UAISense Prediction (predicts future location — call UAISense Prediction::RequestPawnPredictionEvent ). Navigation System Off mesh links : Use ANavLinkProxy in level, or implement INavLinkCustomInterface for traversal callbacks. EQS (Environment Query System) Run modes : SingleResult (cheapest), RandomBest5Pct , RandomBest25Pct , AllMatching BTTask RunEQSQuery : set EQSRequest.QueryTemplate , BlackboardKey , RunMode . Async lifecycle managed via FBTEnvQueryTaskMemory.RequestID . Custom context (resolve BB actor for use in tests): See references/eqs reference.md for generator and test configurations. State Trees (UE 5.1+) Use State Trees for simpler state machines, designer friendly workflows, and Smart Object integration. Use Behavior Trees for complex reactive combat with priority based interrupts. State Tree tasks use FStateTreeTaskBase + FInstanceDataType . Override EnterState , Tick , ExitState . State Tree evaluators ( FStateTreeEvaluatorBase ) run persistently across all active states — use them for shared context data (nearest enemy, threat level) that multiple states read, analogous to BT services. Smart Objects Add USmartObjectComponent to world actors (set SmartObjectDefinition ). AI interacts via USmartObjectSubsystem : Common Mistakes Polling instead of event driven : Do not check per frame in TickTask if a BTDecorator Blackboard observer abort or WaitForMessage achieves the same result. Overcomplicated BTs : Flatten needless nesting. Use services for periodic knowledge updates at Interval = 0.5s . Gate expensive EQS with BTDecorator Cooldown . NavMesh gaps : Always place ANavMeshBoundsVolume . For streaming/procedural levels, call NavSys Build() after generation or use UNavigationInvokerComponent on AI pawns. Server vs client : AAIController only exists on the server. Replicate AI state via Pawn replicated properties, not through the controller. BT Blackboard is not replicated. Large worlds : Use hierarchical NavMesh (RecastNavMesh actor settings). Set EQS max parallel queries per frame in Project Settings AI EQS. Edge Cases Flying/swimming : Set FNavAgentProperties::bCanFly / bCanSwim ; assign a UNavArea subclass with matching SupportedAgents flags. Custom UNavArea subclasses define traversal cost and area flags — create one per movement domain (e.g., UNavArea Water with high cost for ground agents, zero for swimmers). Apply via NavModifierVolumes or NavMesh generation settings. Dedicated server : Sight perception uses collision traces, not rendering — works fine. Guard non server code with HasAuthority() . AI with GAS : BT tasks request ability activation; abilities manage their own latent logic. Related Skills ue actor component architecture — component setup patterns for AI ue gameplay framework — GameMode AI spawning, controller/pawn relationships ue cpp foundations — delegates, subsystems, UObject patterns ue gameplay abilities — GAS + AI integration Reference Files references/behavior tree patterns.md — patrol, combat, flee, investigate, squad BT patterns references/eqs reference.md — generator and test configurations for spatial queries