diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-04-28 08:16:26 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-04-28 08:16:26 -0300 |
commit | afb4ce8d2d637b0a2cb56c0450c6b3c5d10aa47f (patch) | |
tree | a927ed7ab3f80d0bab79d585c41c53c512c379e6 /modules | |
parent | 8d199a9b2c71de3c5218a636249171b60a832092 (diff) |
Reduce false positives in interior detection by adding a small offset to raycast, fixes #18476
Diffstat (limited to 'modules')
-rw-r--r-- | modules/csg/csg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index f399466fe5..761a309751 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -1216,7 +1216,7 @@ void CSGBrushOperation::MeshMerge::mark_inside_faces() { center /= 3.0; Plane plane(points[faces[i].points[0]], points[faces[i].points[1]], points[faces[i].points[2]]); - Vector3 target = center + plane.normal * max_distance; + Vector3 target = center + plane.normal * max_distance + Vector3(0.0001234, 0.000512, 0.00013423); //reduce chance of edge hits by doing a small increment int intersections = _bvh_count_intersections(bvh, max_depth, max_alloc - 1, center, target, i); |