Jump to content

Collide Against Multiple Objects


Recommended Posts

I am currently working on a procedural generation program in Phaser, which generates the environment by stitching together a series of tiles in a grid format. Think along the lines of a roguelike. At the moment the collision detection is a bit wonky under certain circumstances.

When I move against a set of solid tiles horizontally with Arcade physics turned on and the walls set to immovable, it moves along smoothly;


The black line is just there to illustrate where the non-solid tiles end and the solid ones begin. Each tile on screen is an individual sprite.

When moving vertically though, the movement gets "stuck" as if the item is catching against the solid items. Again as above, each tile is a sprite;


I'm using moveToPointer to move the object on screen. Here's a screenshot with some debug collision bodies turned on for reference;


Any help is greatly appreciated, thank you.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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