Image Layer starts off offset from Tiled layer

When I add an Image layer and display it in libgdx it is offset compared to the tiled layer. In the below example I had to offsety by 1250 to get it to line up correctly with the tile layer. Is this an issue or by design?

Did you forget to attach an image?

This sounds like an incompatibility with libgdx or a parsing problem. Is it perhaps trying to anchor the image about its centre or a corner other than the top left? Is 1250 perhaps the size or half the size of your image?

Is the image layer offset in Tiled at all?

In any case, Tiled has no real say on how libgdx renders its layers, it’s possible libgdx treats images differently from Tiled, and your parser might not account for this. If this is a bug, it’s probably with the parser rather than Tiled, so make sure you ask the libgdx community (or whoever wrote the parser, if it’s not part of libgdx) as well.

1 Like