You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 19:11:41 +00:00
Fix Line2D not rendering anything when total length is not computed
This commit is contained in:
@@ -112,7 +112,7 @@ void LineBuilder::build() {
|
||||
}
|
||||
}
|
||||
|
||||
if (Math::is_zero_approx(total_distance)) {
|
||||
if (point_count < 2 || (distance_required && Math::is_zero_approx(total_distance))) {
|
||||
// Zero-length line, nothing to build.
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user