ppy/osu-framework

IncrementalBSplineBuilder fails to add control points at start of input path

Closed this issue · 0 comments

Best explained using TestSceneInteractivePathDrawing. If you draw a path, the B-spline builder will not start adding control points until a certain distance from the starting point is reached, so any detail at the start of the input path is lost.

osu.Framework.Tests_G9BaX2XKTU.mp4

I think the issue is on IncrementalBSplineBuilder line 159.
In this scenario, the control point count is 2 so momentum direction does not get calculated. Therefore only the distance is taken into account to determine whether to add a new control point.
A fix could be to take the momentum direction from the start of the input path as the momentum direction for the control points if the control point count is 2.