Cramer Posted August 21, 2017 Share Posted August 21, 2017 Hello all, if i display a tilemap and then move the camera the tilemap gets clipped. When i first load the tilemap everything is rendered properly (red border is the canvas size) but then when i move the camera a bit it looks like this The tilemap is still in the canvas but it doesn't get fully rendered. Here is also a modified example from Phaser.io to demonstrate that problem:http://phaser.io/sandbox/sKmpqFwf just draw some tiles and then move the camera with the arrow keys Any help would be appreciated. Link to comment Share on other sites More sharing options...
harmal Posted October 26, 2017 Share Posted October 26, 2017 This same thing happens to me. its really annoying. ive tried all kinds of hacks to get around it but to no avail. i hope you find an answer. Link to comment Share on other sites More sharing options...
Papz Posted October 26, 2017 Share Posted October 26, 2017 I think is the world bounds. if you have a canvas W and H: 500 and you move your camera to 600, they crop your sprites bcs you are out of the world you need set a world bounds game.world.setBounds(0, 0, 600, 500); so your camera is your canvas H and W but your world is much bigger: H 500 and W: 600 the red line is your camera in your exemple now with setBounds you can move your camera (red line / canvas size ) + 100 to the right and no one is clipped Link to comment Share on other sites More sharing options...
Recommended Posts