fix to ensure generated light probes do not get placed too close to manual light probes

(cherry picked from commit 97205ea5b8)
This commit is contained in:
Kyle Appelgate
2023-10-17 08:56:35 -04:00
committed by Rémi Verschelde
parent 13d5227911
commit 2df506ea15

View File

@ -709,7 +709,7 @@ void LightmapGI::_gen_new_positions_from_octree(const GenProbesOctree *p_cell, f
const Vector3 *pp = probe_positions.ptr(); const Vector3 *pp = probe_positions.ptr();
bool exists = false; bool exists = false;
for (int j = 0; j < ppcount; j++) { 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; exists = true;
break; break;
} }