Navmesh generation appears to have issues handling terrain and planes that are at 45 degree or steeper angles even if the agent max slope is set to allow for such movement. While the issue occurs at 45 degrees, it will also occur starting roughly at 44.5 degrees with a Cell Size of 19 and Cell Height of 10 (the default size for navmesh generation in a new project).
The holes in the navmesh will also move and change size as the geometry is rotated further. If you set the slope above 65, you can unlock the rotation gizmo from a set amount and gradually rotate the plane to see the holes move and change size at each new slope. The original comment by the licensee mentions 45 degrees, but it is not isolated to only that slope.
While reproducing this behavior, it was noted that changing the Cell Size used by the navmesh generation can affect the quality of the navmesh generated on the plane at 45 degrees and slightly beyond. With a Cell Size of 10, the plane appears to have the proper navmesh at 45 degrees, but rotating the plane further to 58.5 degrees will cause the navmesh holes to begin appearing again.
The licensee has supplied their own current fix which consists of changing the span minimum height value in RecastRasterization::RasterizeTri. The code and exact location within that method can be found in the referenced UDN thread.
Expected Result: The plane has navmesh generated over its upwards facing surface.
Actual Result: The navmesh that is generated on the plane has holes in it that change in position and size as the navmesh is rotated to different slopes.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-164886 in the post.
1 |
Component | UE - AI - Navigation |
---|---|
Affects Versions | 5.0.3, 5.1 |
Target Fix | 5.3 |
Fix Commit | 25084492 |
---|---|
Main Commit | 25085242 |
Created | Sep 23, 2022 |
---|---|
Resolved | May 2, 2023 |
Updated | May 19, 2023 |