• Content Count

  • Joined

  • Last visited

  1. Log entry 739: Still no clue xD If it will help anyone, I tried migrating current code to one that would use physics, but it backfired. It has a lot of problems, being the top-down game, I'm not able to do a lot of stuff I need. Also, things like movement doesn't do well. So in the end, I improvised and checked overlap of rotated sprites of different shapes by checking distance and angle between sprites. If it is in certain range, and under certain angle -> overlaping. It takes more computing and it's not general solution but it works for me. Also, no one seems to know the answer about using this function which I mentioned in the first post
  2. I will look into it, and I will work it out. Thanks for replies. I'll post info here for anything valuable I figure out.
  3. Awesome answer, just what I needed. PS. I'm making top-down game, and in my case gravity and friction are not needed at all. That is the reason why I decided to go without physics arcade. I'ts my first time making a game in Phaser but not in general. I know how everything with and without physics work, but not sure what Phaser has to offer. One more question, if I include physics in my game, could and should I mix it with raw code for sprite's (position, angle and such) update?
  4. Yeah, but what about the function I mentioned earlier? If I decide to use physics do I have to change a lot of code for it to work?
  5. This is how it should work in the background, but sadly it's only for rectangle shaped sprites. Probably if something is rotated, or of a different shape it wouldn't work as it should. Since no one else has been replying, my guess is I have to use physics and bodies thanks for reply anyway
  6. Hi everyone, I wanted to test if two sprites are overlaping withouth physics2d. Sprites are of a different shape. I found this function in phaser docs. If I understand right, it should check if first sprite overlaps given object, in my case another sprite. Phaser.Sprite.overlap(displayObject) : boolean; I use this like if (player1.overlap(player2)) ... else ... where both players are sprites. Am I using this wrong, or this function is deprecated because I get an error that this function does not exist. If is possible to check overlap with this function please tell, because i made a project without physics2d and i don't want to make a lot of changes now. Thanks ahead.