summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Semrau <brian@winterpixel.com>2023-02-10 20:44:39 -0500
committerBrian Semrau <brian@winterpixel.com>2023-02-10 20:44:39 -0500
commit53b4d850720a70026f33f32ac8a2d77561aff59d (patch)
tree473e231c9c8d15d4dcc1b3cf4c90b6bcac8ba9bf
parented85a2c8ceae048c2b29bc6ccf6f53a9c70ec811 (diff)
Fix Line2D UVs when using BOX end cap mode
-rw-r--r--scene/2d/line_builder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp
index d91f6e36bb..0970325502 100644
--- a/scene/2d/line_builder.cpp
+++ b/scene/2d/line_builder.cpp
@@ -393,6 +393,8 @@ void LineBuilder::build() {
if (end_cap_mode == Line2D::LINE_CAP_BOX) {
pos_up1 += f0 * hw * width_factor;
pos_down1 += f0 * hw * width_factor;
+
+ current_distance1 += hw * width_factor;
}
if (texture_mode == Line2D::LINE_TEXTURE_TILE) {