Many licensees like to use ShapeComponents as blocking volumes instead of proper volumes, as they can be more easily placed and sized in the editor. The docs and code make it sound like it is possible to use statically placed components with NavArea_Null to block pathing through the blocking volume, but this only works if you set the Dynamic Obstacle bool. If you enable the bool it then uses the box component's actual collision geometry as a nav area, which allows blocking navigation. This is counter to what the comments say should happen. If you give the shape blocking physics collision but don't enable nav obstacle, it will actually generate paths on top of the box
I believe the issue is in UShapeComponent::GetNavigationData, it only exports the Area Class at all if DynamicObstacle is set. This should either check AreaClass as well, disable editing Area Class if Dynamic Obtacle is not set, or change the name or comments of Dynamic Obstacle to more clearly describe what it is actually doing. In this case I have to enable that flag to make a completely Static thing work as a non-obstacle Nav Area. This is a fairly old issue
One related thing I noticed is that UPrimitiveComponent::GetNavigationData will export if Fill Collision Underneath is set, so if you have both dynamic obstacle and fill collision set it ends up exporting two separate nav areas which appears to be inefficient and may conflict with each other
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-103272 in the post.
1 |
Component | UE - AI - Navigation |
---|---|
Affects Versions | 4.20, 4.25 |
Created | Nov 17, 2020 |
---|---|
Resolved | Jul 19, 2022 |
Updated | Jul 19, 2022 |