How to change the sides of world bounds

I’ve been trying to change the bounds on a plat former so the bounds would change to the size of the tile map i used, so it would fit it

I do this:

this.physics.world.setBounds(0, 0, map.width * tileset.tileWidth, map.height * tileset.tileHeight);

where map is a Phaser.Tilemaps.Tilemap and tileset is a Phaser.Tilemaps.Tileset

1 Like

Also map.widthInPixels and map.heightInPixels.

2 Likes