Godot Version
v4.2.1.stable.mono.official [b09f793f5]
Question
I was unable to apply a “padding” to the navigation mesh, so agents were sometimes stuck at corners of a ground, laid out on a rectangular grid (by bumping into the walls at the corners).
I then made the agents able to go through the walls (since ideally they would only want to remain inside the navigable region), but when I applied avoidance
, they occasionally left the ground.
Since my game generates the walkable world dynamically, I cannot bake a smaller navigation mesh so that the agents would keep some distance from the walls. I’m now trying to build my own navigation mesh instead. I have already developed the algorithm that essentially shrinks the walkable area as necessary, generates a bunch of interconnected rectangles that I’d like to merge into a mesh, which I could convert dynamically into a navigation mesh.
This image illustrates a possible arrangement of interconnected rectangles that define the walkable region (marked with blue and green to indicate the size): Imgur: The magic of the Internet
How would you recommend doing this – merging the rectangles into a mesh --, without me “re-inventing the wheel”?