NavModifier cannot move with player

add a NavModifier component to player pawn, set “Navigation Mesh/Runtime/Runtime Generation” to “Dynamic Modifiers Only”, play in editor, and toggle “show Navigation”, then can see the navmesh does not move with player:

122563-rtx截图未命名0.png

122561-rtx截图未命名.png

Hey windywang,

After investigating this issue, I do not believe that it is a bug. If you notice, the component is not a scene component, which means it’s not necessarily attached to the component hierarchy that you have set up. As a result, I wouldn’t expect it to move with the character. Navigation Modifiers, in my experience, have been used more as a way to alter the Nav Mesh in a specific, static area.

If you’d like your character to create a hole in the Nav Mesh, you can try setting Can Ever Affect Navigation to true and that should give you a similar result based on the character’s capsule collision.

Have a great day

I have tried that, the obstacle area does not move with player, either

What exactly are you looking to accomplish, overall? It’s possible that this is not the best way to go about this and I may be able to offer some alternatives.

If you want a pawn to affect navmesh generation you also need to set its bCanAffectNavigationGeneration to true.

it moves with player now, but the navmesh generate some blank areas. there is only one NavMeshBoundsVolume, where are the blank area comes from?

only the center area can be regenerated correctly

I want to add a dynamic obstacle area for every player, but the UNavArea_Obstacle type could not be excluded from ProjectPointToNavigation, so I want to use UNavArea_Null instead

some tiles disappear after movement

I have a couple of questions:

  • Now that you enabled CanAffectNavigationGeneration,are you still using the Nav Modifier volumes on the characters?
  • Do you have your runtime generation set to dynamic (assuming you do, just double-checking)?
  • Have you tried creating a new, simple level with one character in it to test your Nav Mesh generation? I’d recommend doing this until you can get it working the way you want.

“runtime generation set to dynamic” resolves the problem, thanks!