summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Burjachenko <iblackcatw@gmail.com>2019-01-01 11:41:25 +0400
committerArtem Burjachenko <iblackcatw@gmail.com>2019-01-02 17:34:58 +0400
commit6ff26b105ae3121400d8742a2218c5649b316f51 (patch)
tree34ed106476ec2c6ed7e6a3dc65c41c2e57c1e85a
parent89560c2138d00c6b64f09dda97a18cb84ab76aff (diff)
Fix line 2D intersection behavior
-rw-r--r--scene/2d/line_builder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp
index d5e8a33805..0ff2e30ba4 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;
}