-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"CursorTrailRotate" does not work even if enabled in skin.ini #31482
Comments
This will require shader changes. Maybe @EVAST9919 can pick it up? https://osu.ppy.sh/wiki/en/Skinning/skin.ini
Here's a starting point: diff --git a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs
index ca0002d8c0..45ea485963 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs
@@ -24,6 +24,7 @@ public partial class LegacyCursorTrail : CursorTrail
private IBindable<float> cursorSize = null!;
private Vector2? currentPosition;
+ private bool spin;
public LegacyCursorTrail(ISkin skin)
{
@@ -34,6 +35,7 @@ public LegacyCursorTrail(ISkin skin)
private void load(OsuConfigManager config, ISkinSource skinSource)
{
cursorSize = config.GetBindable<float>(OsuSetting.GameplayCursorSize).GetBoundCopy();
+ spin = skin.GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.CursorTrailRotate)?.Value ?? true;
Texture = skin.GetTexture("cursortrail");
diff --git a/osu.Game.Rulesets.Osu/Skinning/OsuSkinConfiguration.cs b/osu.Game.Rulesets.Osu/Skinning/OsuSkinConfiguration.cs
index 9685ab685d..81488ca1a3 100644
--- a/osu.Game.Rulesets.Osu/Skinning/OsuSkinConfiguration.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/OsuSkinConfiguration.cs
@@ -9,6 +9,7 @@ public enum OsuSkinConfiguration
CursorCentre,
CursorExpand,
CursorRotate,
+ CursorTrailRotate,
HitCircleOverlayAboveNumber,
// ReSharper disable once IdentifierTypo
diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
index 5132dc2859..5670d7213c 100644
--- a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
+++ b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
@@ -206,6 +206,7 @@ private void addPart(Vector2 localSpacePosition)
private struct TrailPart
{
public Vector2 Position;
+ public float Rotation;
public float Time;
public Vector2 Scale;
public long InvalidationID;
@@ -219,6 +220,7 @@ private class TrailDrawNode : DrawNode
private Texture texture;
private float time;
+ private float rotation;
private float fadeExponent;
private readonly TrailPart[] parts = new TrailPart[max_sprites];
@@ -239,6 +241,7 @@ public override void ApplyState()
texture = Source.texture;
time = Source.time;
fadeExponent = Source.FadeExponent;
+ rotation = Source.Rotation;
originPosition = Vector2.Zero;
|
Not sure why we would need to change shader code. Can't we just compute rotated vertex positions in the draw node? |
Possibly, it was a bit deep for me to setup in 5 minutes so I bailed 😅 |
Type
Cosmetic
Bug description
When the skin.ini setting ‘CursorTrailRotate’ is enabled, the cursortrail rotates in stable, but not in lazer.
There is a possibility that this is the intended behaviour, but I was curious.
Here is a skin where you can see the behaviour (blue line is cursor and red line is cursortrail, both ‘CursorRotate’ and ‘CursorTrailRotate’ are enabled for clarity)
Screenshots or videos
stable:
https://github.com/user-attachments/assets/1a07c58b-8e54-4e90-aec2-1dc0ea52917b
lazer:
https://github.com/user-attachments/assets/04172685-a634-4d4f-85f9-d36ee69fdbd2
Version
2025.101.0-lazer
Logs
compressed-logs.zip
The text was updated successfully, but these errors were encountered: