• Content Count

  • Joined

  • Last visited

  1. How would I create basic enemy AI (say, have a guard patrol and when he hits a wall he turns around) when using tilemaps? I tried using the blocked property but that didn't seem to work.
  2. I'm making a game in Phaser using Tiled for level design. However, when I rotate objects in the object layer and use the createfromobjects function to generate those objects in the game itself, the x and y positions have been messed up. I've taken screenshots to demonstrate: In Tiled In Phaser How do I solve this? Is this a known bug with the current version of Phaser?
  3. What exactly is the difference between the overlap and intersects functions, besides the fact that intersects can't use callback functions?
  4. Quick question about the overlap function. Does it only return as true when the two bodies initially overlap and not after, even if they still overlap? Or does it return as true during the entire duration of the overlap? My test code indicates the former, but maybe I'm doing something wrong. if(game.physics.arcade.overlap(this.enemySprite, player_sprite)) { game.debug.text('enemy and player overlap', 10, 10); } else { game.debug.text('enemy and player do not overlap', 10, 10); } Practical application is that I have bullets randomly passing through enemies, and I thought this was one possible explanation.