Navmodifier in dynamic spawned Actor?

Hello!

In our project we use the navmesh to move both players and NPCs you can build stuff, and I recently found the navmodifer component, I put one in the baseblueprint for buildings so NPCs do not enter them unless they absolutly need to and added one to a road tile to encourage NPCs to walk along the roads, however when I dynamically spawn them they do not seem to work?

Especially since when there is roads placed the runtime navmesh doesnt recalculate wich is rather curious.

Also the priority works how exactly?
Assuming higher cost = higher avoidance, but how much cost does the basic green navmesh actually have?

Main road is supposed to be highest priority i put it to 0
followed by townroads at 0.5
and houses by 2 , assuming default is 1?

Any help would be appreciated.
Thanks!

Regards
Peter

I tried runtime spawning a blueprint with NavModifier component on latest code and it did worked fine. Which release are you using?

Default area has travel(default) cost = 1 and entering cost = 0. Travel cost is a distance multiplier, so AI will be willing to take detour twice as long to avoid using shortcut with travel cost = 2. Entering cost is added once on area change and doesn’t care how far it will go. In most cases you should be using area’s travel cost to adjust path finding results.

Keep in mind that travel cost should be always greater than 0. If you need really low travel cost in comparison to default one, you can always use navigation filters to change cost value of any area. Those filters are blueprints created from NavigationQueryFilter class, just add overrides for some areas (probably only NavArea_Default) and use them in your pathfinding queries.