Skip to content

Commit 96cdbbe

Browse files
committed
Merge pull request godotengine#102870 from timoschwarzer/fix/line-2d-not-rendering
Fix Line2D not rendering anything when total length is not computed
2 parents 11d8e2e + ebef20f commit 96cdbbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/2d/line_builder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void LineBuilder::build() {
112112
}
113113
}
114114

115-
if (Math::is_zero_approx(total_distance)) {
115+
if (point_count < 2 || (distance_required && Math::is_zero_approx(total_distance))) {
116116
// Zero-length line, nothing to build.
117117
return;
118118
}

0 commit comments

Comments
 (0)