1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00

modify damp length to effectively invert repulsion strength

This commit is contained in:
Gabe Livengood 2022-07-06 17:01:14 -04:00
parent 40e98f84f3
commit d5b4d14670
No known key found for this signature in database
GPG Key ID: 70321B78DAECE683

View File

@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Osu.Mods
private void easeTo(DrawableHitObject hitObject, Vector2 destination)
{
double dampLength = Interpolation.Lerp(3000, 40, 0.8 * RepulsionStrength.Value);
double dampLength = Vector2.Distance(hitObject.Position, destination) / (0.04 * RepulsionStrength.Value + 0.04);
float x = (float)Interpolation.DampContinuously(hitObject.X, destination.X, dampLength, gameplayClock.ElapsedFrameTime);
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, gameplayClock.ElapsedFrameTime);