Jump to content

Collision in Arcade does not work as expected


Monk_i
 Share

Recommended Posts

Hello,

I'm working on a simple tile game using the Phaser framework (new to Phaser), but unfortunately I've stumbled upon a "bug" when using the Arcade collision method. I want all the tiles to stack on top of each other, but the tiles on top always go through the tiles below them. I've tried to come up with a solution, but I'm really stuck. I hope someone can help me. I've put my script on codepen, so you can test it there and see what I mean :

 

 

Link to comment
Share on other sites

Do you need "true" physics or just a falling effect? You may find Tweens work better if you just want the effect.

You can try to "freeze" bodies once they are moving slowly and colliding on the bottom edge. A smaller bounce, a larger velocity threshold, and more-frequent updates are more likely to keep them separated.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...