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 Using Tileset With Corners #30883

Closed
Bloodyaugust opened this issue Jul 28, 2019 · 6 comments
Closed

Navigation2D Using Tileset With Corners #30883

Bloodyaugust opened this issue Jul 28, 2019 · 6 comments

Comments

@Bloodyaugust
Copy link

Bloodyaugust commented Jul 28, 2019

Godot version:
3.1.1

OS/device including version:
Win 10/AMD Radeon R9 200 Series

Issue description:
After having created a tileset, and placing navigation polygons that only partially take up those tiles, it seems that corners are causing get_simple_path to return no solution. I've verified that the tiles line up exactly in the tileset and editor, and also that the nav polygons do as well.
When enabling navigation debug drawing, I've noticed an odd artifact that I believe may be responsible for causing the undesired behavior, but am unsure as to what is causing this artifact.

Successful case
tilemap-pathfinding-bug-3

Artifact in-game
tilemap-pathfinding-bug-4

Configured tilemap
tilemap-pathfinding-bug-1

Failing case
tilemap-pathfinding-bug-2

Steps to reproduce:

  • Configure tilemap with corners
  • Draw navigation polys
  • Attempt to use get_simple_path across corner tile

Minimal reproduction project:
bug-repro.zip

@Raphael2048
Copy link
Contributor

There are some error when i try to open the repro project .

@novhack
Copy link

novhack commented Jan 11, 2020

I have encountered the same bug. When I try to create navigation polygons in the tileset editor they become messed up when running the game.
bug

@DanielKinsman
Copy link
Contributor

I get similar problems in 3.2.2 on linux.

This is my tileset with navigation polygons highlighted

tilemap_navigation

And this is in game with Debug->Visible Navigation on.

game_navigation_debug

The white line shows a path returned from Navigation2D.get_simple_path()

@DanielKinsman
Copy link
Contributor

Here is a sample project which should highlight the lack of a solution from get_simple_path when mixing tiles with different navigation polys.

navigation

tilenavtest2.zip

@smix8
Copy link
Contributor

smix8 commented May 19, 2022

Same as in #41349 the TileSet Editor stores the polygon data in wrong order in the TileSet resource compared to other Editor tools that edit NavigationPolygon resources.

@akien-mga
Copy link
Member

Fixed by #61266.

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

8 participants