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

Curve2D.get_closest_point() incorrectly documented #5894

Open
jgodfrey opened this issue Jun 28, 2022 · 0 comments
Open

Curve2D.get_closest_point() incorrectly documented #5894

jgodfrey opened this issue Jun 28, 2022 · 0 comments
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository bug

Comments

@jgodfrey
Copy link

jgodfrey commented Jun 28, 2022

3.4.4.stable.official

The get_closest_point() method of Curve2D seems to be incorrectly documented

URL to the documentation page

The documentation states that get_closest_point(to_point) method:

Returns the closest baked point (in curve's local space) to to_point.

However, in practice, that doesn't seem to be the case. The point returned by the call seems to be an interpolated point along the Curve2D based on the to_point argument. That is, it returns a Vector2 that's (potentially) not found in the collection of baked points.

I took a quick look at the source code for get_closest_point() and, indeed, it does not appear to explicitly return one of the baked points (though I didn't follow some of the details there).

@jgodfrey jgodfrey added the bug label Jun 28, 2022
@Calinou Calinou added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository bug
Projects
None yet
Development

No branches or pull requests

2 participants