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

Joint2D and Joint3D: update joint on NOTIFICATION_POST_ENTER_TREE #58641

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

rburing
Copy link
Member

@rburing rburing commented Feb 28, 2022

In contrast with updating only on NOTIFICATION_READY, this allows reparenting, etc.

Fixes #31711 and fixes #41398 in master.

Also fixes a related issue (in a separate commit): makes set_exclude_nodes_from_collision respect signal connections.

@akien-mga
Copy link
Member

Is there a specific reason why it needs to be in POST_ENTER_TREE instead of ENTER_TREE? Not that it's wrong but we usually use the latter so unless the post is important here for timing, it could use ENTER_TREE for consistency.

@rburing
Copy link
Member Author

rburing commented Mar 1, 2022

This is to guarantee that all the possible node setups which were previously admissible still remain admissible, e.g. with a body being a child of the joint. Using ENTER_TREE would limit the possible node setups, which could be a future design decision (but would need the addition of an error and documentation); the current PR preserves the status quo of admissible node setups.

@akien-mga akien-mga merged commit 97e5367 into godotengine:master Mar 1, 2022
@akien-mga
Copy link
Member

Thanks!

@rburing rburing deleted the joints_fix_signals branch March 1, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants