Curve2D.get_closest_point() incorrectly documented #5894
Labels
area:class reference
Issues and PRs about the class reference, which should be addressed on the Godot engine repository
bug
3.4.4.stable.official
The
get_closest_point()
method ofCurve2D
seems to be incorrectly documentedURL 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 aVector2
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).The text was updated successfully, but these errors were encountered: