LCM Nav3D Free demo Get it on Fab

Tutorial 08 - Perception-driven tactical AI

TL;DR: Add an LCM Nav3D AI Perception Bridge next to your agent's UAIPerceptionComponent → its perceived threats auto-feed the LCM Nav3D | Threats From AI Perception EQS context → a true-3D LCM Nav3D EQS query (volumetric candidate points + 3D-LOS / cover / threat-exposure tests) picks a flanking or cover position → your BT/StateTree moves the agent there. Mass crowds get the same via the LCM Nav3D Mass Perception Agent trait, which writes a perceived-threats fragment.

Why this exists

Stock UE tactical AI flows through EQS, but the stock generators/tests are 2.5D (navmesh-projected). A flying or multi-level NPC can't reason about cover, line-of-sight, or flanking in true 3D with them. LCM Nav3D ships true-3D EQS - candidate points anywhere in the navigable volume, scored by volumetric SVO line-of-sight, cover, and threat exposure - and a one-click bridge so the threats those tests score against come straight from UE's own perception system.

Prerequisites


Part A - UActor agent (BT / StateTree)

Step 1 - Add the perception bridge

On your agent (the pawn or its controller - wherever the UAIPerceptionComponent lives), Add Component → "LCM Nav3D AI Perception Bridge" (ULcmAIPerceptionBridge).

That's the entire perception-to-LCM Nav3D link.

Step 2 - Build the tactical EQS query

Create an EQS query (e.g. EQS_FindFlankingApproach) and assemble it from these nodes:

Generator (pick one):

Node Use it for
LCM Nav3D | Points In SVO Volume general 3D candidate cloud around the agent
LCM Nav3D | Hemispherical Ring 3D sniper-perch / high-ground / orbit candidates (set Upper Hemisphere Only)
LCM Nav3D | Points Along Path candidates strung along the LCM Nav3D path to a goal

Tests (add several; set each one's Context to LCM Nav3D | Threats From AI Perception where it scores against threats):

Node Purpose Typical setup
LCM Nav3D | Threat Exposure prefer low summed danger toward threats Score, prefer less
LCM Nav3D | Cover Score 3D prefer positions occluded from threats Score, prefer greater
LCM Nav3D | Line Of Sight 3D filter to (or away from) visible-to-threat Filter
LCM Nav3D | Reachability 3D drop positions the agent can't path to Filter (Context = Querier)
LCM Nav3D | Path Distance 3D prefer near / far by LCM Nav3D path length Score (Context = Querier)
LCM Nav3D | Height Advantage favour high ground over threats Score, prefer greater

A solid "flank to cover" query: Points In SVO VolumeReachability 3D (filter) → Cover Score 3D (score↑) → Threat Exposure (score↓) → Path Distance 3D (score↓, mild weight).

The threats every threat-scoring test sees come from the bridge via LCM Nav3D | Threats From AI Perception - no manual tagging. (For non-perception workflows, LCM Nav3D | Known Threats returns actors tagged ApexThreat instead.)

Step 3 - Wire it into BT or StateTree, then verify

Verify in PIE: the agent should pick positions that are reachable, in cover from, and low-exposure toward the threats it currently perceives - and should stop reacting to a threat ~5 s after losing sight of it (the decay window). Walk a threat out of the sight cone and watch the chosen position shift once it decays.


Part B - Mass crowd variant

For crowd-scale tactical perception, use the native LCM Nav3D Mass perception (Tutorial 06 covers Mass setup):

  1. Add the LCM Nav3D Mass Perception Agent trait (ULcmMassPerceptionTrait) to your Mass entity config - set FactionId, SightRadius, FOVDegrees. Agents perceive different-faction agents within range + FOV + true-3D SVO line of sight.
  2. The ULcmMassPerceptionProcessor writes each agent's closest visible hostile into its FLcmMassPerceivedThreatsFragment (ClosestThreatPos, bHasThreat, VisibleCount, LastSeenSeconds).
  3. Read that fragment in your Mass logic (a StateTree task via UMassStateTreeProcessor, a steering processor, etc.) to drive evade / engage / regroup behaviour.

Mass agents consume the perceived-threats fragment directly - they don't issue EQS queries (there is no Mass-native EQS querier). EQS tactical queries are the UActor path (Part A). A hero-NPC-as-UActor querying with Apex: Known Threats can include crowd-relevant threats by tagging, giving a practical hybrid.


What you build by hand

The nodes above are all shipped and usable. What is not shipped is prebuilt query assets - you author your own from the generators and tests, which Tutorial 07 walks through end to end.

Four nodes need live flow-field or macro-graph state and are not available: the flow-field-directed generator, the flow-field-alignment test, the active-flow-field context, and the portal-proximity generator.