Hello everyone,
I am messing around with the native Unity navmesh + navmesh components to be able to bake it in runtime. I already figured out how to set navmesh surface and bake the navmesh from script after the level is procedurally generated. But I have an issue where navmesh agents are floating above ground.
dependablebreakablecarpenterant
Is there a way to set agents to navigate on navmesh but walk on the actual colider of ground mesh? From what I searched an option to bake height mesh would solve this but this option isn’t available for baking in runtime.
Also setting offset for navmesh agents won’t work as there are different areas where offset between ground and navmesh is from 0.1 to 0.2.
I saw that navmesh is reworked in Unity version 2022. Should I go for beta to work with better version of navmesh?
To be more specific:
I have a empty game object “ChunkGen” that generates all chunks of small island as its children. That root object has a NavMeshSurface component attached and after all the chunks are generated the function BakeNavMesh() is called to bake everything into single navmesh.
I am trying to make it work for weeks already and can not figure it out.
So if anyone could point me in the right direction I would be very glad for it.
Thanks,
Adam
