diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 6 | ||||
-rw-r--r-- | servers/visual_server.cpp | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 5faf0e67ca..8e21ecc189 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -1048,8 +1048,9 @@ void VisualServerScene::_update_instance(Instance *p_instance) { VSG::storage->particles_set_emission_transform(p_instance->base, p_instance->transform); } - if (p_instance->aabb.has_no_surface()) + if (p_instance->aabb.has_no_area()) { return; + } #if 0 if (p_instance->base_type == VS::INSTANCE_PARTICLES) { @@ -3278,8 +3279,9 @@ void VisualServerScene::render_probes() { void VisualServerScene::_update_dirty_instance(Instance *p_instance) { - if (p_instance->update_aabb) + if (p_instance->update_aabb) { _update_instance_aabb(p_instance); + } if (p_instance->update_materials) { diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 65dd4d7661..dacf04f8d6 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -339,7 +339,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect2(src[i], Vector2()); + aabb = Rect2(src[i], Vector2(0.00001, 0.00001)); //must have a bit of size } else { aabb.expand_to(src[i]); @@ -355,7 +355,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect2(src[i], Vector2()); + aabb = Rect2(src[i], Vector2(0.00001, 0.00001)); //must have a bit of size } else { aabb.expand_to(src[i]); @@ -385,7 +385,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect3(src[i], Vector3()); + aabb = Rect3(src[i], Vector3(0.00001, 0.00001, 0.00001)); } else { aabb.expand_to(src[i]); @@ -401,7 +401,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect3(src[i], Vector3()); + aabb = Rect3(src[i], Vector3(0.00001, 0.00001, 0.00001)); } else { aabb.expand_to(src[i]); @@ -735,6 +735,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ //first bptr[idx] = Rect3(); bptr[idx].position = v; + bptr[idx].size = Vector3(0.00001, 0.00001, 0.00001); //must have at least a bit of size any_valid = true; } else { bptr[idx].expand_to(v); |