1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

scale down repulsion strength

This commit is contained in:
Gabe Livengood 2022-06-08 01:00:47 -04:00
parent f21c9fb520
commit f54a68f6ca
No known key found for this signature in database
GPG Key ID: 70321B78DAECE683
2 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@ namespace osu.Game.Rulesets.Osu.Mods
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay) };
public abstract BindableFloat EasementStrength { get; }
protected virtual float EasementStrengthMultiplier => 1.0f;
protected Vector2 CursorPosition;
protected DrawableHitObject WorkingHitObject;
protected abstract Vector2 DestinationVector { get; }
@ -65,7 +66,7 @@ namespace osu.Game.Rulesets.Osu.Mods
private void easeHitObjectPositionToVector(DrawableHitObject hitObject, Vector2 destination)
{
double dampLength = Interpolation.Lerp(3000, 40, EasementStrength.Value);
double dampLength = Interpolation.Lerp(3000, 40, EasementStrength.Value * EasementStrengthMultiplier);
float x = (float)Interpolation.DampContinuously(hitObject.X, destination.X, dampLength, gameplayClock.ElapsedFrameTime);
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, gameplayClock.ElapsedFrameTime);

View File

@ -22,13 +22,15 @@ namespace osu.Game.Rulesets.Osu.Mods
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(OsuModMagnetised)).ToArray();
[SettingSource("Repulsion strength", "How strong the repulsion is.", 0)]
public override BindableFloat EasementStrength { get; } = new BindableFloat(0.5f)
public override BindableFloat EasementStrength { get; } = new BindableFloat(0.6f)
{
Precision = 0.05f,
MinValue = 0.05f,
MaxValue = 1.0f,
};
protected override float EasementStrengthMultiplier => 0.8f;
protected override Vector2 DestinationVector
{
get