소스 검색

Merge pull request #41199 from madmiraal/fix-38001

Mark the first shape as inside, not the second shape, when CSG shapes are co-planer.
Rémi Verschelde 5 년 전
부모
커밋
3b3d82f40f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      modules/csg/csg.cpp

+ 2 - 2
modules/csg/csg.cpp

@@ -583,8 +583,8 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de
 							// Check if faces are co-planar.
 							if ((current_normal - face_normal).length_squared() < CMP_EPSILON2 &&
 									is_point_in_triangle(face_center, current_points)) {
-								// Only add an intersection if checking a B face.
-								if (face.from_b) {
+								// Only add an intersection if not a B face.
+								if (!face.from_b) {
 									_add_distance(intersectionsA, intersectionsB, current_face.from_b, 0);
 								}
 							} else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) {