Skip to content

Commit aeede49

Browse files
committed
fix to ensure generated light probes do not get placed too close to manual light probes
1 parent ec0cd99 commit aeede49

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scene/3d/lightmap_gi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ void LightmapGI::_gen_new_positions_from_octree(const GenProbesOctree *p_cell, f
698698
const Vector3 *pp = probe_positions.ptr();
699699
bool exists = false;
700700
for (int j = 0; j < ppcount; j++) {
701-
if (pp[j].is_equal_approx(real_pos)) {
701+
if (pp[j].distance_to(real_pos) < (p_cell_size * 0.5f)) {
702702
exists = true;
703703
break;
704704
}

0 commit comments

Comments
 (0)