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

Don't generate CSGPolygon3D shape before the assigned path is inside tree #72427

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

MinusKube
Copy link
Contributor

Fixes #71240

Within the NOTIFICATION_ENTER_TREE, we don't know at this point if the assigned path node has actually entered the tree. So I removed the _update_collision_faces() call here, and replaced it by a _make_dirty() call, like it's done in the set_use_collision method, so the update is deferred.

Also I added a small check inside the _build_brush() to return an empty brush if the path node is not inside tree.

@MinusKube MinusKube requested a review from a team as a code owner January 31, 2023 01:09
@Chaosus Chaosus added this to the 4.0 milestone Jan 31, 2023
@akien-mga akien-mga merged commit 62689af into godotengine:master Jan 31, 2023
@akien-mga
Copy link
Member

Thanks!

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