Hi,
I’m creating a game where the “level” is a series of potentially infinite (but functionally nowhere near infinite) rooms, that are generated around the player as they move. In order to have the enemies follow the player, I have these rooms bake the navmesh once they’ve randomized their walls. This means that I am baking several, smaller navmeshes at a time usually. Here are some pictures to show the level design:
I’m wondering what I could do to optimize the generation of navmashes, as the is a noticeable frame drop whenever they are generated. Any help would be greatly appreciated. Thanks!
See those pink debug between some of the navigation mesh tiles? That is the edge connection margin. A convenience feature that helps to connect navigation mesh polygons that have unaligned edges but it does so at a super high performance cost that does not scale well with larger maps. You can disable this feature on the navigation regions or the entire navigation map for a huge performance boost. At that point the only way to connect your navigation meshes is by perfect edge overlap.
Do you have any recommendations on how to achieve perfect edge overlap? I originally had some flat meshes coming off of the “doors” which spilled into the neighboring rooms, however this caused weird issues with pathing, as they overlapped.