From c349c2b40497dbb42710cdee7fc4d2d6a63b0c8d Mon Sep 17 00:00:00 2001 From: jiepengtan Date: Thu, 27 Jun 2024 15:33:54 +0800 Subject: [PATCH] sprite's pivot should scaled by current costume's bitmapResolution --- spgdi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spgdi.go b/spgdi.go index 80f9e0c9..68fb5b81 100644 --- a/spgdi.go +++ b/spgdi.go @@ -134,8 +134,8 @@ func (p *spriteDrawInfo) updateMatrix() { c := p.sprite.costumes[p.sprite.costumeIndex_] img, centerX, centerY := c.needImage(p.sprite.g.fs) - centerX += p.sprite.pivot.X - centerY -= p.sprite.pivot.Y + centerX += p.sprite.pivot.X * float64(c.bitmapResolution) + centerY -= p.sprite.pivot.Y * float64(c.bitmapResolution) rect := image.Rectangle{} rect.Min.X = 0 rect.Min.Y = 0