Skip to content

Conversation

EfveZombie
Copy link
Contributor

fix #556

Comment on lines 493 to 498
dtStatus stat = getPolyHeight(randomPolyRef, pt, &h);
if (dtStatusFailed(status))
return stat;
pt[1] = h;

if (dtStatusSucceed(stat)) {
// otherwise pt is on poly edge
pt[1] = h;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be switched to closestPointOnPoly instead. Also, can you please undo the whitespace changes (or submit them as a separate fix)? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it

@jakobbotsch jakobbotsch merged commit 0af470f into recastnavigation:master Oct 13, 2022
@jakobbotsch
Copy link
Member

Thank you!

onehundredfeet pushed a commit to onehundredfeet/recastnavigation that referenced this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dtNavMeshQuery::findRandomPoint got failed sometimes
2 participants