mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:07:52 +08:00
Fix vertical drag in down-scroll scenarios
This commit is contained in:
parent
7d54d4b800
commit
ff24a15760
@ -52,9 +52,9 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
|
||||
if (drawableRuleset.ScrollingInfo.Direction.Value == ScrollingDirection.Down)
|
||||
{
|
||||
// When scrolling downwards, the position is _negative_ when the object's start time is after the current time (e.g. in the middle of the stage).
|
||||
// However all scrolling algorithms upwards scrolling, meaning that a positive (inverse) position is expected in the same scenario.
|
||||
targetPosition = -targetPosition;
|
||||
// We're dealing with screen coordinates in which the position decreases towards the centre of the screen resulting in an increase in start time.
|
||||
// The scrolling algorithm assumes a top anchor meaning an increase in time corresponds to an increase in position, so when scrolling downwards the coordinates need to be flipped.
|
||||
targetPosition = hoc.DrawHeight - targetPosition;
|
||||
}
|
||||
|
||||
double targetTime = drawableRuleset.ScrollingInfo.Algorithm.TimeAt(targetPosition,
|
||||
|
Loading…
Reference in New Issue
Block a user