Explorar o código

Fix line 2D intersection behavior

Artem Burjachenko %!s(int64=6) %!d(string=hai) anos
pai
achega
6ff26b105a
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      scene/2d/line_builder.cpp

+ 4 - 0
scene/2d/line_builder.cpp

@@ -279,6 +279,10 @@ void LineBuilder::build() {
 			}
 		} else {
 			// No intersection: fallback
+			if (current_joint_mode == Line2D::LINE_JOINT_SHARP) {
+				// There is no fallback implementation for LINE_JOINT_SHARP so switch to the LINE_JOINT_BEVEL
+				current_joint_mode = Line2D::LINE_JOINT_BEVEL;
+			}
 			pos_up1 = corner_pos_up;
 			pos_down1 = corner_pos_down;
 		}