Hi!

I'm playing around with the physics layers in tilesets, but there is something I do not understand concerning the handling of borders. Imagine you have 32×32 tiles next to each other. There seems to be an invisble overlap or sharing the same points or similar.
As an example, I have created a project using fixed movement steps / grid based moves at codeberg

Using layers in the tilemap corresponding to the physics layers, I've set up collision shapes for every (used) tile and the player, all (32×32). But at some points I have trouble walking, although the printed output of the target position seems to point to a walkable layer. If I reduce the players CollisionShape to 31×31 pixels I can move mostly as expected, but I do not get why. The pixels do not overlap as a tile has 32×32 and the player and its shape too. However, even with reduced shape, I cannot step from the ship to land, neither with 32×32 nor 31×31 shape (the latter I can explain as there is half a pixel missing and so it is colliding with the pixel of the water tile underneath the boat.
Example project keys:
«←↓↑→»: move
«F» : force movement (apply target_position in any case)
«R» : reset player coordinates to 0/0
«S» : toggle the players CollisionShape between 32×32 and 31×31

So it seems they are colliding at the edges although they are lying next to each other.

My question: Can someone explain to me how this physics stuff works and why it is colliding at the borders without an overlap?

(I do know that it would be much easier to use get_used_cells(layer_id) to check for possible steps in a grid based movement, I just used the fixed size to demonstrate what I want to know ⇨ how the borders between layers work.)

Thanks for reading 😉

edit1: Linkfix
edit2: Godot Version 4.1.3.stable.arch_linux