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 Curve3D::get_closest_point() broken #69239

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

xiongyaohua
Copy link
Contributor

@xiongyaohua xiongyaohua commented Nov 27, 2022

Fix #69220

The problem is caused by calling adaptive tessellation baking function by mistake, which produce too few points for straight lines. Calling the even length tessellation fix the problem. The code for get_closest_point() and get_closest_offset() are also updated. They used to assume bake interval to be exact, which is no longer true.

The out dated document for get_closest_point() is also updated.

Fix #69507 as a by product, which is caused by a typo. (size_t instead of real_t)

All fixes have been applied to the Curve2D counterpart #69115.

@xiongyaohua xiongyaohua changed the title Fix #69220 Fix https://github.com/godotengine/godot/issues/69220 Nov 27, 2022
@xiongyaohua xiongyaohua changed the title Fix https://github.com/godotengine/godot/issues/69220 Fix #69220 Nov 27, 2022
@TokageItLab TokageItLab changed the title Fix #69220 Fix Curve3D::get_closest_point() broken Nov 27, 2022
@TokageItLab
Copy link
Member

@xiongyaohua Please write a summary of the fixed part in the commit comment, not a reference to the issue id.

@xiongyaohua
Copy link
Contributor Author

xiongyaohua commented Nov 27, 2022

@xiongyaohua Please write a summary of the fixed part in the commit comment, not a reference to the issue id.

done

@xiongyaohua xiongyaohua force-pushed the fix_69220 branch 2 times, most recently from dc36389 to 6b93e96 Compare December 2, 2022 03:15
@xiongyaohua xiongyaohua requested a review from a team as a code owner December 2, 2022 03:15
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

@xiongyaohua As mentioned the commit title is preferred to be just a summary, I think the "Fix #69220" part is not desired in there. Feel free to leave it in the commit message but not in the title (the first line).

Besides that the code/changes LGTM.

@xiongyaohua
Copy link
Contributor Author

xiongyaohua commented Dec 3, 2022

As mentioned the commit title is preferred to be just a summary, I think the "Fix #69220" part is not desired in there.

I misunderstood, and added summary without removing the "Fix #69220" part. Now it is removed.

The problem is caused by calling adaptive tessellation baking function by mistake, which produce too few points for straight lines. Calling the even length tessellation fix the problem.

The code for `get_closest_point()` and `get_closest_offset()` are also updated. They used to assume bake interval to be exact, which is no longer true.

The out dated document for `get_closest_point()` is also updated.
@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.

CSGPolygon3D using Path does not follow medium sized path well Curve3D get_closest_point broken
4 participants