From 930ad8fc8c9349a56673677e85308b54c39f456d Mon Sep 17 00:00:00 2001 From: Ramesh Ravone Date: Wed, 26 Apr 2017 07:57:13 +0530 Subject: [PATCH] 3.0 recompute_aabb on add_surface --- scene/resources/mesh.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index ab3e143e608..de5661af05e 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) {