浏览代码

Use is_equal_approx() instead of vertex_snap when checking if ray is
colliding with equiplanar CSG faces.

Marcel Admiraal 5 年之前
父节点
当前提交
63f4e92195
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/csg/csg.cpp

+ 1 - 1
modules/csg/csg.cpp

@@ -523,7 +523,7 @@ void CSGBrushOperation::MeshMerge::_add_distance(List<real_t> &r_intersectionsA,
 
 
 	// Check if distance exists.
 	// Check if distance exists.
 	for (const List<real_t>::Element *E = intersections.front(); E; E = E->next()) {
 	for (const List<real_t>::Element *E = intersections.front(); E; E = E->next()) {
-		if (Math::abs(**E - p_distance) < vertex_snap) {
+		if (Math::is_equal_approx(**E, p_distance)) {
 			return;
 			return;
 		}
 		}
 	}
 	}