Problem with Navigation Invokers

Hello,

We have a large streaming world, and are using dynamic navigation. It seems to work well for the most part, except for one issue.

When registering a pawn as a Navigation Invoker, it will only start generating navigation if it is within a certain radius of the player, maybe 3-5000 units. Basically, if I register an invoker near the player, nav generates fine. But if I register one 5000 units or more away from the player, no navigation generates. Though if the player then moves within that distance of the registered invoker it will start generating navigation and continue generating it even if the player moves back outside of that distance again.

I can’t find any setting for this in the Navigation Mesh or the Navigation System, through the Project settings, Blueprints, or C++ api. I’ve tried registering the invokers long after BeginPlay in case that was an issue, but got the same results.

Any help would be appreciated!

Hey sbounds,

I have a few questions that will help gather information so I can try to reproduce the issue:

  • Is your Nav Mesh Bounds part of your persistent level?
  • Are you sure that your Nav Mesh Bounds Volume is large enough to allow for the Nav Invokers to generate when they are further than x amount of units from the player?
  • How are you registering your pawn as a Navigation Invoker? Are you adding the component to the pawn at runtime or by default in the blueprint or C++ class itself?

Hi ,

  • The bounds is in the persistent
    level, but I’ve also tried placing it
    in the sub-level with the same
    result.
  • Yep, I’m sure. I’ve also tried making
    it different sizes wondering if
    perhaps I had it too large, but it
    doesn’t seem to make a difference.
  • I’ve tried both. The interesting
    thing is when adding them to the
    blueprint and placing the pawns in
    the editor, they do all generate the
    nav as expected at that time, but
    then at runtime they do not.

Thanks!

After further investigation, I have not been able to reproduce your issue.

Here’s what I tried:

I started with the Top Down Project and expanded the floor by about 300 in the x and y directions.

After doing this, I added a Nav Invoker to my character and ensured to set the Project Settings option Generate Navigation Only Around Invokers, as well as set the Runtime Generation to Dynamic for my Nav Mesh.

Finally, I created a pawn that contained a Nav Invoker and placed it in the world and created a sub level that is set to Always Loaded that contains one of the Nav Invoker pawns as well.

After playing in editor, the Nav Mesh generated as expected regardless of the distance from the player.

Could you give this a shot in a clean project and see if you’re able to replicate your results? If so please provide a detailed list of repro steps.

Thanks!

Hi ,

Thanks for taking a look. I’ve also been unable to repro the issue so far in a new project, but it’s certainly there in our main project. I’ve scoured all the navigation settings but can’t figure out what the difference would be.

We have quite a large streamable landscape using World Composition with 2km square tiles. The issue only seems to happen when playing from that specific world, testing on other levels in the same project seems to work fine.

Do you have any ideas of things I could try?

Thanks!

Thanks for giving it a shot in a clean project.

Have you tried adjusting the Tile Number Hard Limit in Edit->ProjectSettings->NavigationMesh? You’ll need to hit the dropdown arrow under the Generation section to see that option.

I’m not thinking that this will resolve your issue, but it’s worth a try to see if it makes a difference when you increase the limit.

In the meantime, I’m going to get in touch with one of our developers and see if I can gather more information regarding this.

I tried playing around with that hard limit a bit. If I make it really small, like 16, I can see it having an affect, but even if I make it ridiculously large it still only generates for invokers near the player. It seems so strange, I can even eject and then drag the player character near other invokers and they will then begin generating just fine.

Edit, some more info:
If I add a random delay between 1-10 seconds on BeginPlay of my pawns, and then register them as invokers after that delay, they seem to work better but it’s not consistent.

Also, during runtime if I select the RecastNavMesh actor and change the Agent Radius value it will force all the missing invokers to suddenly build their nav. Changing other values forces a rebuild of all the previously built nav, but not the missing ones.

And finally, a bug that’s easily reproducible: If you add a Navigation Invoker to a blueprint and then place that blueprint in a level, it will then forever invoke navigation generation at editor time even if you remove the component from the blueprint.

Okay, one more update.

I found what was causing the problem, but I have no idea why it would cause it.

We have some exploding red barrels in the game, these have RadialForce components on them. For some reason if a Navigation Invoker is near one of these barrels on play, but only if the player isn’t near them, they don’t generate nav.

I deleted the RadialForce component from the barrel blueprint and everything works perfectly fine. So my workaround for now that seems to work is just adding the RadialForce component at runtime when the barrel explodes instead of having it in the blueprint.

I can’t seem to repro this at all in a fresh project though, unfortunately.

My guess would be that the RadialForce component has a physics representation that obstructs navmesh generation in the area (meaning it “blocks movement” there). Have you tried messing around with RadialForce component’s collision settings, or setting its bCanEverAffectNavigation to false?

Hi Mieszko,

bCanEverAffectNavigation is set to false, and I don’t see any other collision settings on that component. The odd thing to me is the invokers start generating when the player gets close even though nothing about the barrels has changed.

Hey sbounds,

Thanks for the information. I have a follow-up question regarding this. When you tried to reproduce the issue in a clean project initially, were you using your barrel blueprint as well?

If not, could you try migrating that blueprint into the clean project and recreating the setup again to see if you can get the same results when you’re using that?

Finally, if you are able to get the repro, if you could provide the that would be great.

Thanks again

Hi ,

I did try to migrate our barrel to an empty project, but the migration tool wanted to take about 1000 unrelated assets with it. I tried just re-creating it but wasn’t able to get a repro that way.

If I am able to repro at some point, I’ll be sure to send a project over.

Thanks!

Just fixed this issue, Go through all the components of the actor that the invoker is on and make sure every component has “Can Ever Afect Navigation” set to false. Let me know if this works for any of you.