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

Navigation Polygon Breaks After Re-baked on Godot Engine v4.3 #1134

Closed
bac0id opened this issue Nov 16, 2024 · 1 comment · Fixed by #1135
Closed

Navigation Polygon Breaks After Re-baked on Godot Engine v4.3 #1134

bac0id opened this issue Nov 16, 2024 · 1 comment · Fixed by #1135

Comments

@bac0id
Copy link

bac0id commented Nov 16, 2024

Which demo project is affected:

OS/device including version:

  • Godot Engine: v4.3.stable.mono.official [77dcf97d8]
  • OS: Windows 10 x64

Issue description:

  • Project is upgraded from 4.2 to 4.3.
  • At the first launch, navigation works well. Navigation Polygon looks right.
  • After I click "Bake Navigation Polygon" on toolbar, newer Navigation Polygon looks weird. And navigation becomes weird too.
  • Debugger shows following info:
E 0:00:03:0247   sync: Navigation map synchronization error. Attempted to merge a navigation mesh polygon edge with another already-merged edge. This is usually caused by crossing edges, overlapping polygons, or a mismatch of the NavigationMesh / NavigationPolygon baked 'cell_size' and navigation map 'cell_size'. If you're certain none of above is the case, change 'navigation/3d/merge_rasterizer_cell_scale' to 0.001.
  <C++ source>      modules/navigation/nav_map.cpp:990 @ sync()

Screenshots of issue:
screenshot1
GIF

@smix8
Copy link
Contributor

smix8 commented Nov 16, 2024

Navmesh baking for 2D did not exist when this demo was made, the baking was added in 4.3.

The demo uses a custom hand-crafted navmesh that is gone as soon as you try to bake something because there is no valid bake geometry.

The reason it still has this somehow broken pathfinding after the bake is because the NavigationPolygon has old nested outline data stored but half of the inner outlines are winded in the wrong direction so need to be redone.

EDIT

Made a PR to fix the demo #1135

nav2d

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

Successfully merging a pull request may close this issue.

3 participants