You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Reduce false positives in interior detection by adding a small offset to raycast, fixes #18476
This commit is contained in:
@@ -1216,7 +1216,7 @@ void CSGBrushOperation::MeshMerge::mark_inside_faces() {
|
|||||||
center /= 3.0;
|
center /= 3.0;
|
||||||
|
|
||||||
Plane plane(points[faces[i].points[0]], points[faces[i].points[1]], points[faces[i].points[2]]);
|
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);
|
int intersections = _bvh_count_intersections(bvh, max_depth, max_alloc - 1, center, target, i);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user