mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
modify damp length to effectively invert repulsion strength
This commit is contained in:
parent
40e98f84f3
commit
d5b4d14670
@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
private void easeTo(DrawableHitObject hitObject, Vector2 destination)
|
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 x = (float)Interpolation.DampContinuously(hitObject.X, destination.X, dampLength, gameplayClock.ElapsedFrameTime);
|
||||||
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, gameplayClock.ElapsedFrameTime);
|
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, gameplayClock.ElapsedFrameTime);
|
||||||
|
Loading…
Reference in New Issue
Block a user