Tilemap collisions seems to have gaps between tiles

Godot Version

4.1.3.stable

Question

I created this 2D platformer and used Godot’s tilemap system, I painted the collisions on the tiles in the physics layer, as shown below:

The player’s collision shape is a capsule:

The collisions work most of the time, but at certain positions (in between tiles?), the player just falls straight through.

Working collision:

Broken collision:

My theory is that the tiles’ collisions have some sort of gap in between them since they aren’t merged together like a rectangle CollisionShape2D, which I had been using before switching to the tilemap system.

Any idea on how to get around this?
Thanks in advance :grin:

Edit

One bug I forgot to mention is that the enemy, which is the rotating square, is somehow stuck when it was supposed to follow the player, I believe this has to deal with the tile collisions as well:

Btw, in the above attachment aside from the enemy issue, some changes I had done was to enable CCD for the player (shape cast) and paint the “earth” tile collisions as well, which resulted in the player still sinking, but just halfway through.

I am new too if I am wrong sorry but I think u can use CollisionPolygon2D for fixing gaps. Thats my project I use for map border

1 Like

Thanks, I suppose this is the only way for now. :grin:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.