dlrms08
(Gon Lee)
April 26, 2023, 6:25am
#1
*OS: MacOS Monterey
*SDK: 1.13.3
Hi, guys.
I tried to change the size of a sprite using setScale() but it changes well in the simulator, but the size does not change on the actual device.
is this a bug? Or am I using it wrong?
Changed the scale to 1.6.
The scale is reflected only in the simulator.
ps. the latest version, 1.13.5, found that the scale does not change even in the simulator.
Are you calling setImage after setting the sprites scale?
I found a bug with the newest version that resets the sprites scale when changing its image
As the title says, having set a sprite's scale prior to changing its image the scale is also reset.
Here is a minimal project that reproduces the bug. Press A to set the sprites scale to 2. Press B to call setImage again.
local img = playdate.graphics.image.new("player.png")
local sprite = playdate.graphics.sprite.new()
sprite:add()
sprite:moveTo(200, 120)
sprite:setImage(img)
function playdate.AButtonDown()
sprite:setScale(2)
end
function playdate.BButtonDown()
sprite:setImage(img)
end
f…
2 Likes