Joint2D and Joint3D: make set_exclude_nodes_from_collision respect signals

This commit is contained in:
Ricardo Buring 2022-02-28 22:25:45 +01:00
parent 9e100c3e7a
commit cb5bc58e81
2 changed files with 7 additions and 0 deletions

View File

@ -190,6 +190,9 @@ void Joint2D::set_exclude_nodes_from_collision(bool p_enable) {
if (exclude_from_collision == p_enable) {
return;
}
if (is_configured()) {
_disconnect_signals();
}
_update_joint(true);
exclude_from_collision = p_enable;
_update_joint();

View File

@ -186,6 +186,10 @@ void Joint3D::set_exclude_nodes_from_collision(bool p_enable) {
if (exclude_from_collision == p_enable) {
return;
}
if (is_configured()) {
_disconnect_signals();
}
_update_joint(true);
exclude_from_collision = p_enable;
_update_joint();
}