mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 11:12:59 +08:00
Fix a couple of rotation-related issues
This commit is contained in:
parent
d0766fa1cd
commit
62a24bf16d
@ -174,9 +174,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
var newPos = slider.CurvePositionAt(completionProgress);
|
var newPos = slider.CurvePositionAt(completionProgress);
|
||||||
|
|
||||||
var diff = lastPosition.HasValue ? lastPosition.Value - newPos : newPos - slider.CurvePositionAt(completionProgress + 0.01f);
|
var diff = lastPosition.HasValue ? lastPosition.Value - newPos : newPos - slider.CurvePositionAt(completionProgress + 0.01f);
|
||||||
|
if (diff == Vector2.Zero)
|
||||||
|
return;
|
||||||
|
|
||||||
Position = newPos;
|
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;
|
lastPosition = newPos;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user