diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-21 21:30:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-21 21:30:30 +0200 |
commit | ba57252bd8d7928c29e818b1ccf557e279c33ca0 (patch) | |
tree | 6b037a4a0b8b6907d571b1b847ed6ab3bc7507c3 /scene/3d/lightmap_gi.cpp | |
parent | 726b826b310900ff475122ed65934d2499b8db4d (diff) | |
parent | 90908cd67d3f44ba70cc4b7b32f024ce508cc0ee (diff) |
Merge pull request #52878 from AnilBK/add-get-center
Diffstat (limited to 'scene/3d/lightmap_gi.cpp')
-rw-r--r-- | scene/3d/lightmap_gi.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 7dd083e314..b56f0fd145 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -467,7 +467,7 @@ int32_t LightmapGI::_compute_bsp_tree(const Vector<Vector3> &p_points, const Loc } } if (i == 0) { - centers.push_back(bounds.position + bounds.size * 0.5); + centers.push_back(bounds.get_center()); } else { bounds_all.merge_with(bounds); } @@ -555,7 +555,7 @@ void LightmapGI::_plot_triangle_into_octree(GenProbesOctree *p_cell, float p_cel subcell.position = Vector3(pos) * p_cell_size; subcell.size = Vector3(half_size, half_size, half_size) * p_cell_size; - if (!Geometry3D::triangle_box_overlap(subcell.position + subcell.size * 0.5, subcell.size * 0.5, p_triangle)) { + if (!Geometry3D::triangle_box_overlap(subcell.get_center(), subcell.size * 0.5, p_triangle)) { continue; } |