1
0
Fork 0

Fix 3D top_level resetting

There is no need to erase the top_level flag on EXIT_TREE.
During ENTER_TREE, `top_level = true` is not necessary, because it is
already set to true.
This commit is contained in:
Markus Sauermann 2023-06-22 18:55:19 +02:00
parent e74bf831c2
commit 399bce02cf
1 changed files with 0 additions and 2 deletions

View File

@ -153,7 +153,6 @@ void Node3D::_notification(int p_what) {
data.local_transform = data.parent->get_global_transform() * get_transform();
_replace_dirty_mask(DIRTY_EULER_ROTATION_AND_SCALE); // As local transform was updated, rot/scale should be dirty.
}
data.top_level = true;
}
_set_dirty_bits(DIRTY_GLOBAL_TRANSFORM); // Global is always dirty upon entering a scene.
@ -173,7 +172,6 @@ void Node3D::_notification(int p_what) {
}
data.parent = nullptr;
data.C = nullptr;
data.top_level = false;
_update_visibility_parent(true);
} break;