Jump to content


  • Content Count

  • Joined

  • Last visited

About Babsobar

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Figured it out thanks to KingCosmic on the discord For anyone wondering create{ //Create two sprites, one for each diagonal corner var topLeft = this.add.sprite(0,0) var bottomRight this.add.sprite(mapWidth*32,mapHeight*32) //add them both to an array testArray = [] testArray.push(topLeft) testArray.push(bottomRight) } update{ //Test if they are both inside the camera view cullTest = this.camera.main.cull(testArray) if(cullTest.length == 2){ // restrict zoom or something else } } In my case, this didn't work with getting the tiles, so I created two invisible sp
  2. I had this exact question and I resolved my problem by building a new scene that contained all the UI and launching it from create
  3. This is good because it sets zoom min/max but it doesnt set that according to the maximum amount of map that can be revealed. What I'm looking for is something that sets the zoom's max to the maximum amount of tiles able to be shown so that the outside black of the map is never shown, or as little of it as possible is shown beofre it stop zooming What I thought could be possible would be to create two variables, one containing the top left sprite of the map and the other containing the bottom right sprite and stop zooming if both are within camera bounds That said, I can't find a way to
  4. Hello everyone, I'm looking to set some zoom bounds to the camera much like camera.setBounds sets bounds to the scrolling behavior of the camera to be when there are no more tiles. I've searched the documentation and examples but there aren't any references to such a method or feature. Thanks for any help
  5. The problem with something like this is that it's only useful for QWERTY keyboards, so a broader approach, like setting keys for each needed input seems to me like a better solution, even though that's a little more work.
  6. Just wanted to update on this in case someone is ever searching for a similar problem. I solved my issue by creating another scene and launching that scene within my editor scene. It's actually much easier, and you retain all the goodness of containers whilst still being able to pass information between those two. So yeah, scenes, scenes all the way.
  7. Hello everyone, I've got a container that has some buttons inside of it, it's a GUI so I have it fixed to the camera with .setScrollFactor(0). My camera can zoom in and out of the tilemap, and when it does, the GUI scales with it, which is the unwanted behavior. I've looked in the documentation and have been trying to find something like .setZoomFactor(0) but unfortunately I could not find anything like it. I then looked inside the examples and in cameras found the ignore container example, which is somewhat similar to what i want. So I created a camera just for displaying th
  8. What you're looking for is here getTileAtWorldXY
  9. Just wanted to update that this problem was fixed by a recent update of Phaser.
  10. I'm still looking for an answer to this problem as well...
  11. Hello rich, Happy that I caught an actual live bug, that would be my first! 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
  12. 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
  13. I've been trying to figure this out for a while now and I feel like there's a problem with tilemap Layers and zooming. Could you try adding zoomIn: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.A), zoomOut: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.E), to your control config and check if that displays culled tiles? I've been pulling my hair out over this. Tilemap layers have a .setDisplayheight and .setDisplayWidth but I get a phaser error telling me no frame is specifed when I try to run them. I feel like I shouldnt have to resize the he
  14. Hello, I'm trying to group together UI elements so that I don't have to assign properties like being locked on screen to each and every one of them every time. In phaser 2 this was done by manipulating groups. While looking through phaser 3's doc I noticed that groups don't exist as they used to, and I can't seem to find how to do groups for UI elements now. Is there a particular way of doing UI elements in phaser 3 or has this not been implemented yet? Thanks
  15. For future reference, the docs are located at this address, and this is the git cloning link: https://github.com/photonstorm/phaser3-docs.git
  • Create New...