-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with removed vertices at tile borders #64
Comments
There are parts that I also haven't fully understood, so it's difficult for me to respond. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been investigating problems with incorrect pathing, e.g.
After some digging, I've found that the root cause is the logic that removes vertices on tile borders while building polymeshes.
There is a parameter that controls the max edge length while tracing contours, it correctly creates 'small' areas:
When later poly mesh is built, it builds a triangulation for each contour. However, there is a piece of code (see RcMeshs.BuildPolyMesh) that marks vertices on the tile borders for removal:
As a result, recast creates a huge polygons on tile borders:
Presumably this is done for better tile stitching? However, it creates problems for pathfinding (since the pathfinding considers edge midpoints, it thinks that going 'around' this polygon is 'shorter' than crossing long edge midpoint).
Removing this vertex removal bit fixes the triangulation (and consequently pathfinding), and doesn't seem to break stitching in my limited testing so far:
However, I don't quite understand all implications. I suspect this part is directly ported from recast?
The text was updated successfully, but these errors were encountered: