• Content Count

  • Joined

  • Last visited

  1. Got it working... I had to use a timeout when calling overlap, because it was checking it too fast, before the sprites were in the game canvas. Thanks!
  2. For some reasong, it's always returning true... even when the sprites are not touching...
  3. Do I have to use physics on my sprites to use overlap?
  4. Hello guys, is there a easy way if is an sprite over another sprite? For example, in my game I can put 2 sprites in the world with random positions, but they must not cover up each other... I have a reference for both objects, so I was wondering if can I do something like this: Phaser.Sprite.over(sprite1, sprite2); // true or falseboth sprite1 and sprite2 is a reference for the created sprite. Thanks!
  5. Hello folks! I'm having a problem, that i consider to be a strange bug... take a look at my game: code: in the game, when the hero touches anything with his left or right part of his body, it changes the direction that its running... so when it touches a wall, it goes to the opposite direction. that works great, but the problem is that when it is walking OVER the floor, only touching the DOWN side, there are some random times that it changes its direction, how am I supposed to fix that? you can play the game, and see what i'm talking about. SPACEBAR jumps the character, the line 32 is the function called invertDirection, in the file play.js thanks!