Skip to content

Conversation

zkz196
Copy link

@zkz196 zkz196 commented Apr 10, 2023

The number of dtLinks assigned to offmeshlink is incorrect, resulting in loss of connections between polygons

@zkz196 zkz196 changed the title a offmeshlink will alloc 3 dtLinks at start tile and 1 dtLink at end … fix: a offmeshlink should alloc 3 dtLinks at start tile and 1 dtLink at end … Apr 10, 2023
@grahamboree
Copy link
Member

Hi! Thanks for the PR. Can you provide some more information about the specific issue this is solving?

@zkz196
Copy link
Author

zkz196 commented Apr 11, 2023

image
as you see, the old code calculated maxLinkCount as
edgeCount(4) + portalCount(2)*2 + offMeshConLinkCount(8)*2 = 24.
In fact, offMeshLink will be used
baseOffMeshLinks(8) * 2 + connectExtOffMeshLinks(8) = 24
so the start polygon do not link the end polygon directly

@grahamboree grahamboree self-assigned this Apr 20, 2023
@grahamboree grahamboree removed their assignment Jul 4, 2023
Mauler125 added a commit to Mauler125/r5sdk that referenced this pull request Aug 24, 2024
Noticed this issue when creating multiple number of off-mesh links between 2 polygon islands. Turns out a pull request was already created to address this problem at recastnavigation/recastnavigation#622. Merged the changes directly as this yields correct behavior as far as off-mesh links have been tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants