LCM Nav3D Free demo Get it on Fab

Tutorial 09 - Hybrid LCM Nav3D + Recast crowd avoidance

TL;DR: Add ULcmCrowdAvoidanceBridge to your LCM Nav3D flying pawn → stock UE5 UCrowdManager Detour RVO sees the LCM Nav3D pawn and steers Recast crowd agents around it. The Z-band filter (auto-applied by the bridge) prevents false-collision avoidance between agents at different vertical bands.

Prerequisites

Step 1 - Add the bridge to your LCM Nav3D pawn

In the editor, select your LCM Nav3D pawn → Add Component → search "LCM Crowd Avoidance Bridge".

Defaults are sensible:

That's it for the LCM Nav3D side.

Step 2 - Add Recast crowd agents (existing UE5 pattern)

Your Recast ground crowd agents should already use UCrowdFollowingComponent instead of the default UPathFollowingComponent. This is the standard UE5 setup for any project using crowd avoidance - LCM Nav3D doesn't change this. If you're not already on UCrowdFollowingComponent:

// In your AAIController subclass constructor
GetCharacterMovement()->bUseAccelerationForPaths = true;
//. and override the AIController to use UCrowdFollowingComponent

Or in Blueprint: the AIController's UCrowdFollowingComponent is auto-registered as the agent.

Step 3 - Play

Hit Play. Your LCM Nav3D flying pawn and Recast ground crowd agents now avoid each other (per the Z-band filter rules below).

How the Z-band filter works

Unreal's UCrowdManager Detour RVO assumes coplanar agents - out of the box, a flying LCM Nav3D agent at Z=500 would be flagged as a "neighbour" by a Recast ground agent at Z=0, producing avoidance behaviour that looks like the ground agent dodging an obstacle 5 meters overhead.

The bridge fixes this at the avoidance-group bitfield level:

Same engineering work, leverages stock Detour rather than fighting it.

Tuning r.LcmNav.Crowd.ZBandHeightCm

Use case Recommended value
Default (typical pawn-height scenes) 200
Low-ceiling interior (1.5m floors) 150
Vertical skyscraper (need fine-grained per-floor separation) 100
Open sky (most LCM Nav3D traffic is far above ground) 400
Disable filter (legacy Detour coplanar behaviour) 0

Set the CVar in PIE to live-tune, then commit to your project's DefaultEngine.ini once you're happy.

Stacked multi-floor scenarios

UCrowdManager is one global instance per world. For stacked-floor scenarios (e.g. LCM Nav3D agents at Z=200, 500, 800 sharing the same UCrowdManager), the Z-band filter handles it automatically - each pair of agents whose Z-distance is > 1 band-height ignores each other.

For truly independent crowds (each floor should be its own crowd zone), you'd need to spawn separate UCrowdManager instances per zone via project-side subclassing. This is out of scope for v1.

Performance notes

Acceptance test (manual)

  1. Spawn 5 Recast ground crowd agents in a circle at Z=0.
  2. Spawn 1 LCM Nav3D flying pawn with ULcmCrowdAvoidanceBridge at Z=500.
  3. Fly the LCM Nav3D pawn through the middle of the ground-agent circle.
  4. Expected: ground agents continue their pathing without dodging the airborne pawn (Z-band separation > 200cm default).
  5. Now fly the LCM Nav3D pawn down to Z=100 - ground agents dodge it.

If step 4 fails (ground agents dodge the airborne pawn), check r.LcmNav.Crowd.ZBandHeightCm is not 0.

What about the LCM Nav3D pawn's own avoidance?

Two paths, both work:

  1. LCM Nav3D CBS/ORCA (default, the FlyTo task's built-in steering): the LCM Nav3D pawn avoids Recast crowd agents via the existing CBS context. Detour Crowd is purely the publishing surface to the rest of the world.

  2. Use UCrowdFollowingComponent on the LCM Nav3D pawn: replace the LCM Nav3D pawn's AIController's UPathFollowingComponent with UCrowdFollowingComponent. The pawn becomes a full Detour Crowd participant - receives the suggested-velocity from Detour and applies it through its movement component. Combine with ULcmNavMovementComponent for the locomotion side.

Path 1 is the default; Path 2 is for projects that want a uniform crowd avoidance solver across LCM Nav3D and Recast agents.

Mass variant

The Mass-Entity equivalent (UApexCrowdMassBridgeProcessor) ships with T26 Mass Entity work - not yet available.