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

Fix NavigationObstacle3D debug clear regression #101728

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Jan 18, 2025

Clears NavigationObstacle3D on tree exit.

When users would switch scenes the obstacle debug would persist because the is_inside_tree() check in the _update_debug() would still return true, making the debug update instead of removing it.

@smix8 smix8 added this to the 4.4 milestone Jan 18, 2025
@smix8 smix8 requested a review from a team as a code owner January 18, 2025 00:30
Clears NavigationObstacle3D on tree exit.
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code makes sense, but I don't know how to test it. @smix8 is the area maintainer, so it's probably okay.

@smix8
Copy link
Contributor Author

smix8 commented Jan 18, 2025

Added a desc, you just need to add a NavigationObstacle3D with a radius > 0 and switch scenes to see that it did not clear. That was a reg from the obstacle editor plugin rework #93059.

@GremlinsInGame
Copy link

Will this solve the issue where NavigationObstacle3D visuals(orange spheres) are rendered in the wrong scenes in the editor or is that a different(new) issue that I'm experiencing. Im using 4.4beta1. I can provide more information if needed, but i'm thinking this PR may fix it.

@smix8
Copy link
Contributor Author

smix8 commented Jan 19, 2025

@GremlinsInGame This fixes that the debug was not cleared when the node would leave the SceneTree, aka you switch editor scenes. Because the editor uses the same visual scenario for all scenes it would previously render the debug in all open editor scenes that you would switch to.

@Repiteo Repiteo merged commit 4fb4f05 into godotengine:master Jan 20, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 20, 2025

Thanks!

@smix8 smix8 deleted the obstacle_exit branch January 20, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants