Skip to content

Commit

Permalink
Account for scale when calculating sprite offset (#5470)
Browse files Browse the repository at this point in the history
Co-authored-by: Eoin Mcloughlin <[email protected]>
  • Loading branch information
eoineoineoin and eoineoineoin authored Sep 28, 2024
1 parent 1c3ea96 commit 342626a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Robust.Client/UserInterface/Controls/SpriteView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ internal override void DrawInternal(IRenderHandle renderHandle)

var offset = SpriteOffset
? Vector2.Zero
: - (-_eyeRotation).RotateVec(sprite.Offset) * new Vector2(1, -1) * EyeManager.PixelsPerMeter;
: - (-_eyeRotation).RotateVec(sprite.Offset * _scale) * new Vector2(1, -1) * EyeManager.PixelsPerMeter;

var position = PixelSize / 2 + offset * stretch * UIScale;
var scale = Scale * UIScale * stretch;
Expand Down

0 comments on commit 342626a

Please sign in to comment.