Hi to all!
I am new here just started with A* and i have an issue with baking navmesh properly for the recast graph.
Please let me explain:
I have a terrain (2500x2500) with hills an mountains, forests and clearings; with a huge clearing in the middle. That terrain is in one piece and it has one huge structure like a castle that covers the huge clearing in the middle as shown bellow. This structure has a walkable floor merged with walls ramps and gates and this whole thing is one mesh sitting on top of this one piece terrain. So when i hit scan the part of the terrain underneath the structure also gets included into the bake, which sadly resulted in that every now and then the agent decided to walk the navmesh of the terrain bellow instead of the navmesh on top of the floor.
I am looking for ways to discard the navmesh that is bellow of that structure or to ensure that nothing will want to walk on it.
Hi
You could potentially use a navmesh cut component to remove that part of the navmesh.
Alternatively you could try increasing the ‘character height’ setting on the recast graph until the terrain surface underneath the castle floor becomes unwalkable (probably easier).
Hi there cutting looks promising, but i could not find character height yet only walkable height but that did not made much difference. If you dont mind i would have one another question. Is cutting must be an ongoing process? I noticed that it was only cutting at run time at given intervals is there no way to cut in the editor. I know cutting is for dynamic interactions but right now it would be just fine to be static and even permanent.
Thanks for the very quick response!!!
Ah, sorry. I meant walkable height. If you increase it to a value that is larger than the y coordinate difference between the terrain and the floor above, the surface should be removed (i.e. a character with that height would not fit in that space).
The cutting happens during runtime, however it will only be recalculated if you actually move/add/change any navmesh cuts, otherwise it has a very low runtime cost.
I see that is great. I managed to use the walkable height but i had to lower the terrain under the floor which helped. However the the agent still takes a bit of a dive at the seams where the wall ramp and the terrain meets. I take it that cannot be helped?
I’m not quite sure what you mean here. Do you think you could post a video/image?
Never mind looks like the cut was not positioned right there was still some left over pieces that the agent was using when coming off the ramp and that is what looked like “taking dive” under the ramp.
Looking good now! Thanks For all the help!
1 Like