From 6ff26b105ae3121400d8742a2218c5649b316f51 Mon Sep 17 00:00:00 2001 From: Artem Burjachenko Date: Tue, 1 Jan 2019 11:41:25 +0400 Subject: [PATCH] Fix line 2D intersection behavior --- scene/2d/line_builder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index d5e8a33805c..0ff2e30ba4b 100644 --- a/scene/2d/line_builder.cpp +++ b/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; }