Search Issue Tracker

By Design

Votes

0

Found in

2021.3.38f1

2022.3.28f1

6000.0.1f1

Issue ID

UUM-71457

Regression

No

NavMesh Surface is baked too high above the ground, making the NavMesh Agents hover above the ground when the HeightMesh is not built

--

-

Reproduction steps:
1. Open the attached “IN-71884 NavMesh Height Bug.zip” project
2. Open the “SampleScene”
3. Open the Navigation window by going to Window > AI > Navigation
4. Select the “Cube” GameObject in the Hierarchy
5. Under the “Bake” tab of the Navigation window, expand the “Advanced” category
6. Make sure the “Height Mesh” option is disabled
7. (Optional) Enable the “Manual Voxel Size” option and set the “Voxel Size” property to 0.4 or more (the higher the value, the more pronounced the issue is but any value reproduces the issue)
8. Press the “Bake” button
9. Enter Play mode and observe the Scene view from various angles (orthographic perspective from the x or z axes works the best)

Expected result: The NavMesh Surface is baked on the top surface of the “Cube” and therefore the “Capsule” GameObject stays connected to the ground (“Cube”)
Actual result: The NavMesh Surface is baked above the top surface of the “Cube” and therefore the “Capsule” GameObject hovers above the ground (“Cube”)

Reproducible with: 2021.3.38f1, 2022.3.28f1, 6000.0.1f1

Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: No other environment tested

Notes:
- Reproducible in Player
- Reproducible in a new project
- This issue makes large “Voxel Size” unusable without a HeightMesh, which slows down the baking process and then partly negates the benefits of using a larger “Voxel Size”
- Even with the suggested voxel size of 2-4 voxels per agent radius, the effect of NavMesh Agents hovering above the ground is still noticeable, making the HeightMesh a requirement in most scenarios
- Baked NavMesh Surfaces are usually baked at half the “Voxel Size” above the actual surface of GameObjects (with the “Voxel Size” set to 0.3 or 0.7, the NavMesh Surface is baked lower than with the “Voxel Size” at 0.2 or 0.4 in the attached repro project with the built-in NavMesh baking workflow)
- When using the component-based workflow for baking the NavMesh Surface, the actual results are more consistent in reproducing the issue (in terms of the height at which the NavMesh Surface is baked)
- Additionally, with the component-based workflow, when the “Voxel Size” is extra large (>=0.45), a bulge in the NavMesh Surface can appear, instead of the NavMesh Surface not being rendered at all with the built-in workflow

  1. Resolution Note:

    This is by design. The Navmesh is just an approximation of level geometry, and therefore does not fully match the geometry. Having the Build Heightmesh option enabled makes the agent snap to the ground and is the recommended way to resolve this interaction.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.