Merge pull request #100065 from clayjohn/mesh-aabb-clear

Clear AABB when Mesh is cleared
This commit is contained in:
Thaddeus Crews 2024-12-09 14:33:32 -06:00
commit a3656083ca
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
2 changed files with 2 additions and 0 deletions

View File

@ -844,6 +844,7 @@ void MeshStorage::mesh_clear(RID p_mesh) {
mesh->surface_count = 0;
mesh->material_cache.clear();
mesh->has_bone_weights = false;
mesh->aabb = AABB();
mesh->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_MESH);
for (Mesh *E : mesh->shadow_owners) {

View File

@ -851,6 +851,7 @@ void MeshStorage::mesh_clear(RID p_mesh) {
mesh->surface_count = 0;
mesh->material_cache.clear();
mesh->has_bone_weights = false;
mesh->aabb = AABB();
mesh->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_MESH);
for (Mesh *E : mesh->shadow_owners) {