Tiled Based Platformer with Physicsjs collision detection

470 Views Asked by At

This is my first question here, so I'll do my best. I'm programming a 2D tile based platformer using Javascript and HTML5 Canvas. I Use EaselJS as my renderer and PhysicsJS for my collision detection. I've made a map with 'Tiled Map Editor'.

My problem is with the collision detection. It is definitely working, but the problem is that I get too many collisions. My tiles are next to each other, edge-to-edge. The problem with this is that every tile has multiple collisions with the ones around them. Is there any way working around this? So basically I 'only need collision detection on the outer edges of the tiles, who are not connected to another tile'.

I've already made my bodies 1px smaller than my actual images, but I don't think thats the good way.

Thanks in advance

0

There are 0 best solutions below