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

Fix Curve2D/Curve3D baking #61090

Merged
merged 1 commit into from
May 16, 2022
Merged

Conversation

Geometror
Copy link
Member

@Geometror Geometror commented May 16, 2022

Fixes #61086.
image
Looks like the midpoint map was expected to be sorted.
Regression from #60999.

@@ -1668,7 +1668,7 @@ PackedVector3Array Curve3D::tessellate(int p_max_stages, real_t p_tolerance) con
if (points.size() == 0) {
return tess;
}
Vector<HashMap<real_t, Vector3>> midpoints;
Vector<RBMap<real_t, Vector3>> midpoints;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment to clarify that sorting is needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. Added the following:
// The current implementation requires a sorted map.

@akien-mga akien-mga merged commit 61710d8 into godotengine:master May 16, 2022
@akien-mga
Copy link
Member

Thanks!

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.

Connection lines in GraphEdit looks distorted
2 participants