From 97205ea5b8126c4f1f613288d7bd366e6155eeee Mon Sep 17 00:00:00 2001 From: Kyle Appelgate Date: Tue, 17 Oct 2023 08:56:35 -0400 Subject: [PATCH] fix to ensure generated light probes do not get placed too close to manual light probes --- scene/3d/lightmap_gi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index fe1b10a31f35..be217f4d47b2 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -698,7 +698,7 @@ void LightmapGI::_gen_new_positions_from_octree(const GenProbesOctree *p_cell, f const Vector3 *pp = probe_positions.ptr(); bool exists = false; for (int j = 0; j < ppcount; j++) { - if (pp[j].is_equal_approx(real_pos)) { + if (pp[j].distance_to(real_pos) < (p_cell_size * 0.5f)) { exists = true; break; }