- Home /
Dynamically Fixing NavMeshAgent Base Offset?
Scoured around looking for a solution but haven't found anything. So my problem is that I have a bunch of NavMeshAgents and they are floating in the air, or going into the ground depending on what I set the base offset to begin with and where they are walking at the moment. I read that the Navmesh can be up to 10% up from the Height setting and I've been trying to find a way to keep my models at the proper height level so they look like they are walking on the ground. Anyone know of a good way to keep NavMeshAgents at the proper height no matter where they are moving on the navmesh?
Answer by ylg · May 09, 2013 at 03:06 AM
As I understand it, the built-in approach to achieving this is to bake a height mesh along with the navigation mesh. When I first started working with NavMeshAgents, I saw the same behavior you describe until I noticed height meshes are separate and default to off; the Height Mesh checkbox is under Advanced in the Bake options of the Navigation tab.
Yep, I think that was what I was missing, thank you very much
this is amazing thanks, fixed my root motion AI enemy issue where he would always be floating a bit off the ground.
Your answer
![](https://koobas.hobune.stream/wayback/20220613100432im_/https://answers.unity.com/themes/thub/images/avi.jpg)