summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-04-26 08:57:10 +0200
committerGitHub <noreply@github.com>2017-04-26 08:57:10 +0200
commitffbe6660cff57243ec550574cc0ccde0664b68b5 (patch)
tree2a3dde3d92716d085d616de6957a0ca8f66db3f6
parent5c7e6c9212c98fbfcd3c2d2b88cab56eebc00739 (diff)
parent930ad8fc8c9349a56673677e85308b54c39f456d (diff)
Merge pull request #8538 from RameshRavone/patch-7
3.0 recompute_aabb on add_surface
-rw-r--r--scene/resources/mesh.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index ab3e143e60..de5661af05 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -311,6 +311,8 @@ void Mesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const PoolV
surfaces.push_back(s);
VisualServer::get_singleton()->mesh_add_surface(mesh, p_format, (VS::PrimitiveType)p_primitive, p_array, p_vertex_count, p_index_array, p_index_count, p_aabb, p_blend_shapes, p_bone_aabbs);
+
+ _recompute_aabb();
}
void Mesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes, uint32_t p_flags) {