Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent errors when Line2D has 0 length #102778

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Feb 12, 2025

Fixes #101887

@KoBeWi KoBeWi added this to the 4.4 milestone Feb 12, 2025
@KoBeWi KoBeWi requested a review from a team as a code owner February 12, 2025 16:44
@Repiteo Repiteo merged commit d408264 into godotengine:master Feb 12, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 12, 2025

Thanks!

@KoBeWi KoBeWi deleted the line_zero branch February 12, 2025 19:09
@timoschwarzer
Copy link
Contributor

@KoBeWi this PR broke Line2Ds without a gradient or texture. If you create a new Line2D it will not render anything at all. This is because the total distance is only calculated if certain requirements are met, otherwise it's 0 and with this PR doesn't render anything anymore.

https://github.com/KoBeWi/godot/blob/842421ea61562f10ca932bf19b902202438789a7/scene/2d/line_builder.cpp#L92

@AThousandShips
Copy link
Member

Please open a bug report to track this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Godot 4.4 beta 1 'sample_baked: Offset is non-finite' error when using width curve in line2d
5 participants