Skip to content
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

NavigationServer3D.map_get_closest_point_to_segment - add an additional shortest distance check #93541

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

oshman99
Copy link
Contributor

Added an additional shortest distance check for a case when shortest distance is between some point located on a face's edge and some point located on a line segment (thx for the tip @kleonc).
This is an additional fix to this PR #93227. The fix is pretty naive, but it seems to be working:
ezgif-3-c06b95379d

@smix8 @kleonc

@AThousandShips AThousandShips changed the title NavigationServer3D.map_get_closest_point_to_segment- added an additional shortest distance check NavigationServer3D.map_get_closest_point_to_segment- add an additional shortest distance check Jun 24, 2024
@AThousandShips AThousandShips requested a review from a team June 24, 2024 10:12
@AThousandShips AThousandShips added this to the 4.3 milestone Jun 24, 2024
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

It would also be good to add test cases (in test_navigation_server_3d.h? 🤔) which:

…al shortest distance check

For a case when shortest distance is between some point located on a face's
edge and some point located on a line segment.
@akien-mga akien-mga changed the title NavigationServer3D.map_get_closest_point_to_segment- add an additional shortest distance check NavigationServer3D.map_get_closest_point_to_segment - add an additional shortest distance check Jun 29, 2024
@akien-mga
Copy link
Member

I rebased the PR to squash the commits and shorten the commit title a bit.

I suggest adding tests in a follow up PR so we can get this fix merged for now, or we risk forgetting about it :)

@akien-mga akien-mga merged commit f140264 into godotengine:master Jun 29, 2024
17 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

4 participants