NavMesh Doesn't Update w/ Prop Movement

Summary

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

  1. Place any prop in your map
  2. Make a verse script that moves it when the island loads
  3. Enable “Navigation” debugging in Island Settings
  4. 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.

Platform(s)

PC

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.

That also happens with MoveTo() method used via verse :frowning: Nav Mesh is not refreshing properly.

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
  • set Static Mesh as “Hidden in Game”

Wow, that’s a great find, thank you for the help!

I tested it out by moving the prop in verse using an animation controller. I coded this up real quick just to move them up and down:

MoveProp<private>(InProp : creative_prop, InVerticalDistance : float) : void=
        OriginalTransform := InProp.GetTransform()

        NewZ := OriginalTransform.Translation.Z + InVerticalDistance

        KeyFrame : keyframe_delta = keyframe_delta
        {
            DeltaLocation := vector3:
                X := 0.0
                Y := 0.0
                Z := InVerticalDistance
            DeltaRotation := MakeRotationFromYawPitchRollDegrees(0.0, 0.0, 0.0)
            Time := 4.0
            Interpolation := EaseOut
        }

        if (PropController := InProp.GetAnimationController[]):
            PropKeyFrames : []keyframe_delta = array{KeyFrame}
            PropController.SetAnimation(PropKeyFrames, ?Mode:=animation_mode.OneShot)
            PropController.Play()

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