From 62a24bf16d38ffbf9460a8025748c012b20d1939 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 20 Aug 2019 13:18:34 +0900 Subject: [PATCH] Fix a couple of rotation-related issues --- osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs index 332e25750f..02505c3ec0 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs @@ -174,9 +174,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces var newPos = slider.CurvePositionAt(completionProgress); var diff = lastPosition.HasValue ? lastPosition.Value - newPos : newPos - slider.CurvePositionAt(completionProgress + 0.01f); + if (diff == Vector2.Zero) + return; Position = newPos; - Rotation = 90 + (float)(-Math.Atan2(diff.X, diff.Y) * 180 / Math.PI); + Rotation = -90 + (float)(-Math.Atan2(diff.X, diff.Y) * 180 / Math.PI); lastPosition = newPos; }