Babsobar Posted April 5, 2018 Share Posted April 5, 2018 Hello, I'm trying to use setDisplaySize method on a dynamicTilemap layer but I'm getting a 'this.frame is undefined' when trying to set it. It's supposed to take a width and a height as parameters as shown here. I've tried setting it to a frame but it returns the same error. . I believe this may be linked to the problem I've encoutered and posted about in this thread but I'm not sure. Any help much appreciated Link to comment Share on other sites More sharing options...
rich Posted April 5, 2018 Share Posted April 5, 2018 https://github.com/photonstorm/phaser/commit/e31cae93d2d581c9f349234df45291e5f5270c38 Be aware that setDisplaySize sets the size of the entire map, not just the area visible in the camera. So if you've a 2000px wide map and you set the display width to 800, it'll shrink all 2000px of it into 800px. Link to comment Share on other sites More sharing options...
Babsobar Posted April 5, 2018 Author Share Posted April 5, 2018 Hello rich, Happy that I caught an actual live bug, that would be my first! 1 hour ago, rich said: Be aware that setDisplaySize sets the size of the entire map, not just the area visible in the camera. So how would I go about setting the area visible in the camera? I've been trying to figure how to for days, zooming out using the camera doesnt show more of the dynamicTilemapLayer. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts