Skip to content

Commit 4123d4a

Browse files
peppybdach
authored andcommitted
Fix rotating objects in the skin editor not rotating as expected
Closes #33845. Not sure if this ever worked but it was definitely wrong for a while now.
1 parent 10a10ff commit 4123d4a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

osu.Game/Overlays/SkinEditor/SkinSelectionRotationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public override void Begin()
5959
objectsInRotation = selectedItems.Cast<Drawable>().ToArray();
6060
originalRotations = objectsInRotation.ToDictionary(d => d, d => d.Rotation);
6161
originalPositions = objectsInRotation.ToDictionary(d => d, d => d.ToScreenSpace(d.OriginPosition));
62-
DefaultOrigin = GeometryUtils.GetSurroundingQuad(objectsInRotation.SelectMany(d => d.ScreenSpaceDrawQuad.GetVertices().ToArray())).Centre;
62+
DefaultOrigin = GeometryUtils.GetSurroundingQuad(objectsInRotation.SelectMany(d => ToLocalSpace(d.ScreenSpaceDrawQuad).GetVertices().ToArray())).Centre;
6363

6464
base.Begin();
6565
}

osu.Game/Screens/Edit/Compose/Components/SelectionRotationHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public partial class SelectionRotationHandler : Component
3030
/// <summary>
3131
/// Implementation-defined origin point to rotate around when no explicit origin is provided.
3232
/// This field is only assigned during a rotation operation.
33+
///
34+
/// Coordinates are in local space for this container.
3335
/// </summary>
3436
public Vector2? DefaultOrigin { get; protected set; }
3537

0 commit comments

Comments
 (0)