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

NavigationObstacle2D's affect_navigation_mesh property no longer works when using carve_navigation_mesh #99271

Closed
tracefree opened this issue Nov 15, 2024 · 1 comment · Fixed by #99276

Comments

@tracefree
Copy link
Contributor

tracefree commented Nov 15, 2024

Tested versions

Reproducible in builds after commit [07b7f76]

System information

Godot v4.4.dev (07b7f76) - Arch Linux # 1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000 on Wayland - X11 display driver, Multi-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (nvidia; 560.35.03) - AMD Ryzen 5 2600X Six-Core Processor (12 threads)

Issue description

NavigationObstacle2D no longer affects NavigationRegion2D's navigation polygon during baking when its affect_navigation_mesh and carve_navigation_mesh properties are set to to true.

I have bisected the bug to commit 07b7f76 which was introduced in #98957.

(Edit: Corrected the reproduction steps, I had missed that checking carve_navigation_mesh is essential to reproduce the bug)

Steps to reproduce

  • Create a NavigationRegion2D and set up a NavigationPolygon for it.
  • Create a NavigationObstacle2D and either set its vertices or its radius, and position it so that the obstacle overlaps the navigation polygon.
  • Add the obstacle to the navigation_polygon_source_geometry_group group and set up the NavigationPolygon such that it takes this node into account during baking (e.g. set source_geometry_mode to "Group with children")
  • Check affect_navigation_mesh and carve_navigation_mesh
  • Bake the navigation polygon and observe that the obstacle has no effect.

Alternatively, download the MRP below, open the main scene, go to the NavigationRegion2D node and hit "Bake NavigationPolygon".

Minimal reproduction project (MRP)

obstacle_2d_baking_mrp.zip

@tracefree tracefree changed the title NavigationObstacle2D's affect_navigation_mesh property no longer works NavigationObstacle2D's affect_navigation_mesh property no longer works when using carve_navigation_mesh Nov 15, 2024
@smix8
Copy link
Contributor

smix8 commented Nov 15, 2024

Can confirm that it does not bake when carve_navigation_mesh=true but bakes fine without. So likely means the second pass for the projected obstructions was lost in the refactor of the linked PR.

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.

2 participants