Ozu-Beatmap-Toolset / ozu-cli

A cli app to help with Osu! beatmap creation
0 stars 0 forks source link

Slider tail rescaling causes slider tail to be longer than its last control point #11

Open PladsElsker opened 2 years ago

PladsElsker commented 2 years ago

Fixing this for linear sliders is trivial, for perfect circle it's pretty easy, but for the bezier, it's way harder.

So with the linear sliders, just create a vector2 that goes from head to tail, rescale, and tadaaa.

For the perfect circle, we need to find the circle that lies on all 3 points. It's actually pretty easy to do.

For the beziers, we have a couple of choices:

PladsElsker commented 2 years ago

and of course, don't touch control points if it's not needed (curve length > in-game displayed length)

PladsElsker commented 2 years ago

Another way to do this is by transforming the slider into a composite bezier