SplineNavModifier replacing all NavAreas

Hello.

I’m currently using an actor with a SplineComponent and a SplineNavModifierComponent to draw a NavModifier using a spline.

I’m currently encountering an issue where the SplineNavModifier replaces all area classes regardless of what the AreaClassToReplace is set to.

The SplineNavModifier(SNM) actor only has a SplineComponent(Root) and a SplineNavModifier attached to it.

In the attached screenshot, the pink SNM(AreaClass_Recommended) has its AreaClassToReplace set to none, so it works normally by replacing any prior NavMesh in its bounds.

The red SNM(AreaClass_Obstacle) has its AreaClassToReplace set to AreaClass_Recommended, but it replaces any and all NavMesh within it bounds.

I have tried doing the same using both NavModifierBoundsVolume as well as an actor with a BoxCollision and a NavModifierComponent, and they work perfectly.

Are there any settings I am missing to implement this?

[Image Removed]

Steps to Reproduce

  1. Create an Actor BP with a SplineComponent and SplineNavModifierComponent
  2. Place and edit the splines to overlap with the following settings.
  • Actor1 with AreaClass set to NavArea_Obstacle and AreaClassToReplace set to None
  • Actor2 with AreaClass set to NavArea_Null and AreaClassToReplace set to NavArea_Obstacle

This certainly seems to be a bug. thank you for bringing it to our attention!

I have a change in for review to add support for AreaClassToReplace. Here is a link to this on our public issue tracker: https://issues.unrealengine.com/issue/UE-296535. It may take a couple days to update with all of the information, but it will get all f the info mirrored across.

If you run across any other issues or questions, please let us know.

-James

I wanted to let you know that a change was submitted for 5.6.1 today to address this. There is a small change that sets the AreaClassToReplace on the modifier generated at the end of USplineNavModifierComponent::GetNavigationData.

If you would like the individual CL or commit, I can look up the change in UE5 main so you can cherrypick it sooner than waiting for 5.6.1.

The CL is 43578107. And here is a link to the commit on GitHub as well: https://github.com/EpicGames/UnrealEngine/commit/b595aa4dc16112d7d07ab93ff63ec0b9026ecc83

I’ll be sure to check it out when and if we apply the update. Thanks!

Please! It’d be a big help to know the CL as well as the commit of the fix.