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

Navigation2D get_simple_path() does not always find the shortest path #48361

Closed
timcode77 opened this issue May 1, 2021 · 1 comment
Closed

Comments

@timcode77
Copy link

Godot version:
3.3.stable.official

Issue description:
Navigation2D get_simple_path() does not always find the shortest path.

These may be related:
#15919
#17885

Steps to reproduce:
(see demo project / screengrabs)

  1. Create a Navigation2D Node with a NavigationPolygonInstance as a child.
  2. For the NavigationPolygonInstance, draw a shape with 4 vertices and a triangle inside it.
  3. Call get_simple_path for two points inside the NavigationPolygonInstance.
  4. The path generated might not be the shortest path.

See images from my test project that demonstrates the problem:

Shortest path:
image

Not shortest path:
image

Minimal reproduction project:

nav_problem.zip

@Calinou
Copy link
Member

Calinou commented May 1, 2021

Duplicate of #19011, #28235 and possibly others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants