Closed furqan-ahm closed 9 months ago
You are adding the map
to the game instance instead of to the world, swap it to world.add(map)
and it should work.
It also looks like you don't want to manually zoom here, but using the FixedResolutionViewport
:
camera = CameraComponent.withFixedResolution(width: mapSize.x, height: mapSize.y);
You are adding the
map
to the game instance instead of to the world, swap it toworld.add(map)
and it should work.
Thank you, it seems I was using a bad practice of sorts that worked before the update. Adding it to the world seems to work fine.
I was creating a pretty simple game with tile size of 82x82. I created the tilemap on Tiled using Uncompressed settings of fixed tile count. When trying to zoom in based on the canvasSize and the mapSize so that the whole map fits in view. It doesnt seem to work at all, I tried with sprite object and it seemed to be bigger but the Tile Map Component seemed to be same size regardless of zoom level.
Flutter version: 3.13.6 Flame version: 1.10.1 Flame Tiled version: 1.17.1