Update NavMesh After Actor Destroyed

I have a door that I want to destroy or open when interacted with. In the closed state, it can’t let my simple AI through the door, in the opened state it should let them go through. In my BP, I have it destroy the actor (server and multicast RPCs called from player for authority), then my players can move through the door (both server and client), but the AI still won’t nav through it.

This is what it looks like while the door is there.

When the door is moved to not intersect with the NavMesh:

Short recording of the unwanted behavior: (Edit: Sorry for the music playing in the video. I forgot I had desktop sound piping through OBS)

Is there a way to update the NavMesh when an actor is destroyed? Or even just call an update every second or something? Am I missing something silly?

I really am silly lol

The answer is actually quite simple. In Project Settings, look for Navigation Mesh on the left side. Then scroll all the way down to Runtime, and change Runtime Generation from Static to Dynamic. You can then change “Observed Paths Tick Interval” to either be faster (smaller number) or slower (larger number) depending on your needs. For my purposes, the default of 0.5 seconds seems to work fine.

1 Like