From ff318d91eed02a52ed6e8e81a13abf5258a9a839 Mon Sep 17 00:00:00 2001 From: Windy Darian Date: Thu, 14 Mar 2019 00:35:19 -0400 Subject: [PATCH] Fix bone aabb calculation, which caused a skeletal mesh culling issue There was a bug that could result in most bone aabb boxes ending up with tiny size upon import and mess up with culling of skeletal meshes. This fixes it. --- servers/visual_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 3dbe516f74a..19c61065020 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -776,7 +776,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ continue; //break; ERR_FAIL_INDEX_V(idx, total_bones, ERR_INVALID_DATA); - if (bptr->size.x < 0) { + if (bptr[idx].size.x < 0) { //first bptr[idx] = AABB(v, SMALL_VEC3); any_valid = true;