With Navigation debugging on in my IslandSettings, I’ve noticed my NavMesh seems static to the point when the island loads. When I move or hide props (in any way, including prop mover, verse TeleportTo, MoveTo, Hide, etc) the NavMesh remains at the initial point where the props loads.
I’ve also tried modifying nearly every setting on my props (affect navigation, collision settings, etc) to see if somehow that’s impacting the NavMesh. The only thing that seemed to have some kind of impact is that using “Can Be Damaged” setting. When enabled on a prop and instantly moving it via verse at game start, the NavMesh does not appear to reflect the prop being in the original spot (as intended). However, if I move the prop back to the original location via verse, then NPC AI can not properly navigate around the prop since the NavMesh isn’t updated to reflect the prop moving back.
You can see here some props I set in the editor, but immediately hide using verse still affect navigation even though they aren’t there (happens with both hiding the prop and/or moving them).
I’m wondering if this is intended though? I’ve done a lot of digging over the last couple days and saw in UE5 there’s actually a global project setting to set “Dynamic” NavMesh generation. I can’t find this anywhere in UEFN.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
AI
Steps to Reproduce
Place any prop in your map
Make a verse script that moves it when the island loads
Enable “Navigation” debugging in Island Settings
Launch island
Expected Result
The NavMesh will represent the new location of your prop so that AI can properly path find around it
Observed Result
The initial position of the prop is reflected in the NavMesh, and AI continues to navigate as if the prop was there
If a prop was moved to a “green” area of the NavMesh, the NavMesh will not update and AI will have difficulty path finding around the prop.
I found a workaround that I’m not satisfied with. Apparently if you make a sequence then move the prop with a Cinematic Sequence Device, it will update the NavMesh. While it works, there is a little lag because it needs the sequence to complete first.
I’ve found another workaround that may suit your needs. Nav grid generation is messed up for Creative Props but it works for Static Meshes. You can attach Static Mesh that will serve a role of custom navigation collision to your Creative Prop. This way Prop will drive movement and Mesh will drive Nav mesh gen. Just remember to:
set Static Mesh Component within Static Mesh to “Movable”
set Static Mesh property “Can Ever Affect Navigation” to TRUE
At first I tried your suggested settings directly on the StaticMeshComponent of the prop directly but it didn’t work. However, it did work with your proposal of nesting a new static mesh under the prop.
That’s much easier than having to make a bunch of sequences and CinematicSequenceDevices
I have the unfortunate case where, i’m spawning the props via verse ( SpawnProp() ), and unable to find a workaround that works.
Previously i’d been using a custom object pool to avoid using SpawnProp ( i’d read there were performance problems when using SpawnProp ). So i guess i could try using the pool again, and just having a custom hidden object nested below to ensure the nav mesh updates.
Yeah, based on everything I found, I don’t think you’ll be able to dynamically create the prop in verse and have the NavMesh update. Unfortunately your object pool idea is probably the only thing that will work.
Just to add to this… Fixes for this seem to work inconsistently. Even when using an AI Navigation Modification device as a child of the creative prop, it doesn’t always update navmesh when moved via verse. Some game sessions it does, some not.
I’ve been playing around a lot more with the npc spawner and messing with nav mesh. Let me know what other information I can provide to help. As @MidnightCow mentioned, there’s a lot of inconsistency in how navigation is working for npc’s.