How to generate seamless tiled navmeshes #659
Unanswered
jankrassnigg
asked this question in
Q&A
Replies: 1 comment 7 replies
-
This is definitely related to what I want to do relatively soon, so would appreciate hearing about anything you learn. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently trying to build a system where my engine dynamically builds the navmesh for the areas that are needed.
Basically it just splits the world into chunks and generates the navmesh for each chunk on demand and then is supposed to use dtNavMesh::addTile to add that area.
As far as I've seen from the code, dtNavMesh::addTile somehow tries to link neighboring tiles, and I guess it looks at shared edges.
I haven't gotten that far, but I'm pretty sure what I'm doing won't work, because my results look like this:
At sector boundaries the polyongs have a significant gap. I wouldn't expect this to magically work. One reason this gap appears is because of rcErodeWalkableArea, which obviously makes the mesh smaller in all directions, but even without it, I don't get perfectly aligned edges (also in general the mesh becomes useless).
So what is the expected solution to this ? I could maybe generate the meshes with an expanded border region and then cut it down to the bounding box myself afterwards, in hopes that dtNavMesh::addTile will then be able to stitch together the shared edges?
I've also run into dtTileCache which seems to be related, but I don't know how yet. Any pointers how to achieve this would be very much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions