-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Simplify NavMeshQueries3D::_query_task_build_path_corridor
#100549
Simplify NavMeshQueries3D::_query_task_build_path_corridor
#100549
Conversation
acda007
to
3504b85
Compare
Looks promising. Needs a rebase now that #100823 has been merged. |
b3620b9
to
8513066
Compare
Tested this PR and sorry to report that it breaks the pathfinding or at least the current established behavior. When the target polygon is not reachable, e.g. a region is disabled between start and target polygons, the path with this PR gets frequently stuck on the current polygon. In master it picks the polygon closest to the target that can be reached. |
Do you have a test case you can share for this ? So I can look at what's wrong with it. |
8513066
to
13f548c
Compare
Forgot to reset some values in the branch where we cannot reach the desired end. Tested it with your test case, and I now have the same behaviour as master. Thank you for testing and catching this. |
Thanks! |
Hi! My navigation script suddenly started outputting thousands of these errors and it seems that it might be caused by changes in this PR. This wasn't happening with Godot master build from yesterday.
The navigation itself doesn't seem to be broken though. The navigation script in question is very basic: https://gist.github.com/novhack/495c32bb99b3e3ba44539e442935c87d EDIT: I locally reverted this PR and all errors are gone. |
Thank you for reporting this, and sorry for the incovenience. Looking at the code, I think I know where this is coming from. I'll draft something to fix this. |
No need to apologize I'm happy to help and I really appreciate your work. I'll get to it as soon as possible. :) |
Tested and your new PR seems to have solved the issue. :) |
Add improvements discussed in this PR.
Added
distance_squared
instead ofdistance
.Moved some declarations outside the inner loop.
Collapsed the insertion cases into the same branch.