grinmonk Posted April 27, 2018 Report Share Posted April 27, 2018 I'm trying to zoom camera (change its scale) while focused on a player on a tilemap. const speed = 0.01; if (this.cursors.up.isDown) { this.game.camera.scale.add(speed, speed); } else if (this.cursors.down.isDown) { this.game.camera.scale.add(-speed, -speed); } This is how I create the map: this.map16 = this.game.add.tilemap("tilemap16"); this.map16.addTilesetImage("xrpg_tileset", "tileset16"); this.wallsLayer = this.map16.createLayer('Walls'); Both player object and the map layers are placed in the World. But it seems that tilemap layer's position is affected by camera's zoom which looks wrong: https://gph.is/2HuEeDk To check if something is wrong with the scene I replaced the map with an image and zoom worked correctly: https://gph.is/2KitDZL The behaivor is identical in 2.6.2 and 2.10.3. Link to comment Share on other sites More sharing options...
Mickety Posted April 27, 2018 Report Share Posted April 27, 2018 Yeah I have the same problem. Almost made me want to forget about zooming at all Link to comment Share on other sites More sharing options...
Recommended Posts