When using Tiled's Animation system the scale of any object is lost upon the tile switching to it's next animation frame. I believe this bit of code is the issue.
j.batch:set(j.id, t.quad, j.x, j.y, j.r, tile.sx, tile.sy, 0, j.oy)
|
local t = self.tiles[tonumber(tile.animation[tile.frame].tileid) + self.tilesets[tile.tileset].firstgid] |
Since for a tile image based object the tile.sx is going to be the normal 1 or -1 without the additional scaling factor that was calculated when indexing over it in setObjectSpriteBatches(layer)
|
local sx = object.width / tile.width |
The issue seems to be that the instance's information is being overwritten when the tile is updated and it's not taking into account the sx that was calculated based upon the size of the tile itself.
When using Tiled's Animation system the scale of any object is lost upon the tile switching to it's next animation frame. I believe this bit of code is the issue.
j.batch:set(j.id, t.quad, j.x, j.y, j.r, tile.sx, tile.sy, 0, j.oy)
Simple-Tiled-Implementation/sti/init.lua
Line 802 in 2a08bf4
Since for a tile image based object the tile.sx is going to be the normal 1 or -1 without the additional scaling factor that was calculated when indexing over it in setObjectSpriteBatches(layer)
Simple-Tiled-Implementation/sti/init.lua
Line 630 in 2a08bf4
The issue seems to be that the instance's information is being overwritten when the tile is updated and it's not taking into account the sx that was calculated based upon the size of the tile itself.