-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse arrow points in the wrong direction #30843
Comments
I attempted to investigate this one but there's just too much logic going on. Here's a test scene covering this issue for whoever is brave enough to figure this out: // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Tests
{
public partial class TestSceneSliderRepeat : OsuSkinnableTestScene
{
[Test]
public void TestWeirdSlider()
{
AddStep("Slider with wrong direction", () => SetContents(_ => wrongDirectionSlider()));
}
private const double time_offset = 1500;
/// <summary>
/// A <see cref="Slider"/> specification which displays one of the repeat arrows pointing at a completely wrong direction.
/// </summary>
private Drawable wrongDirectionSlider()
{
var slider = new Slider
{
SliderVelocityMultiplier = 0.75,
StartTime = Time.Current + time_offset,
Position = new Vector2(0, -100),
Path = new SliderPath(PathType.PERFECT_CURVE, new[]
{
Vector2.Zero,
new Vector2(-32, 176),
new Vector2(-64, 360),
}, 360),
RepeatCount = 5,
};
return createDrawable(slider, 2);
}
private Drawable createDrawable(Slider slider, float circleSize)
{
slider.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty
{
CircleSize = circleSize,
SliderTickRate = 3
});
var drawable = CreateDrawableSlider(slider);
foreach (var mod in SelectedMods.Value.OfType<IApplicableToDrawableHitObject>())
mod.ApplyToDrawableHitObject(drawable);
drawable.OnNewResult += onNewResult;
return drawable;
}
private int depthIndex;
protected virtual DrawableSlider CreateDrawableSlider(Slider slider) => new DrawableSlider(slider)
{
Anchor = Anchor.Centre,
Depth = depthIndex++
};
private float judgementOffsetDirection = 1;
private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
{
if (!(judgedObject is DrawableOsuHitObject osuObject))
return;
OsuSpriteText text;
Add(text = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Text = result.IsHit ? "Hit!" : "Miss!",
Colour = result.IsHit ? Color4.Green : Color4.Red,
Font = OsuFont.GetFont(size: 30),
Position = osuObject.HitObject.StackedEndPosition + judgementOffsetDirection * new Vector2(0, 45)
});
text.Delay(150)
.Then().FadeOut(200)
.Then().Expire();
judgementOffsetDirection *= -1;
}
}
} |
Had a brief look into this and it's likely something directly in the trig call (everything around it looks sane enough, ie. the reference points should in my eyes give a valid value, and the |
I don't think so, upon looking at it. The situation here is as follows:
|
Type
Cosmetic
Bug description
On this map the reverse arrow of 01:28:091 (1) - points normal to the slider body, instead of inwards. Screenshots are taken in the editor for convenience, but it also shows up like this during gameplay and with different skins.
Screenshots or videos
Lazer
Stable
Version
2024.1115.3
Logs
compressed-logs.zip
The text was updated successfully, but these errors were encountered: