Search Issue Tracker
Fixed
Fixed in 2.1.X
Votes
1
Found in [Package]
2.1.0
Issue ID
SPLB-117
Regression
No
[Splines] SplineMath.PointLineNearestPoint implementation doesn't match the description of the documentation
The document says that "lineParam" is the parameter that represents the ratio along the line segment at which the nearest point is found. However, in the implementation, "lineParam" is actually the signed distance between the projected point on the segment and the point "a".
Either the document or the implementation needs to be changed.
If the implementation is to be changed to conform with the document, I suggest using the alternative implementation attached to this report.
This implementation avoids using "math.length" for performance reason.
Keep in mind that the "SplineMath.PointLineNearestPoint" is used elsewhere in the package, so the special attention to the method's references is necessary.
Reproducible with: 2021.3.14f1
Reproduced on: Windows 10
Note: CQA testing is not required, leaving the description of the issue as is
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Location tooltip in the Viewport of UI Builder window does not update when the UI Document Asset is moved to a different location
- Audio Clip Volume and Avoid Repeating Last fields values cannot be changed in Audio Random Container window
- Setting a variable in the root selector via an imported USS file in a theme does not work
- No character limit when creating a new Scene with excessively long name, Editor can be forced to crash
- URP Decal Projector flickers/glitches when added to Cube or Quad GameObjects as a Component
Resolution Note (fix version 2.1.X):
Changed the documentation of `SplineMath.PointLineNearestPoint` and `SplineMath.RayLineNearestPoint` to explain the returned values more precisely.