Tile - Player collision strange behavior

Godot Version

Godot 4.4.1

Question

To make it simple I have three tilemaps, one for the ground without collision shape, one with the walls on collision layer 2, with a shape painted etc… and a water tilemap on collision layer 3.

My player has both a mask on collision layer 2 for walls and 3 for water, he does collide with walls and can’t pass through them, he does not collide with water even though everything (any godot newbie like me can think of) has been checked to be correctly set. Now that’s where it gets interesting, if I set the water to be on the same collision layer as the walls (2), then the player can’t pass through the water.

I added a simple debug option to print what collision shape the player detected, and he detects the water when it’s on collision layer 3 and he has a mask on 3, however he just walks through.

My best bet would be that I changed something in an obscure setting without meaning to and now am forever stuck with waterwalls. In the end, I’m not really bothered by the issue, I’m just curious why it’s happening.

If you need more details to understand the issue, I will try to provide them. I don’t know what kind of screenshots can help you for this issue…

PS : tried one last thing before sending this, I was using move_and_slide() so I checked with move_and_collide() since there might be some black magic at work here. It didn’t work and when I put in the script :

var collision = move_and_collide(velocity * delta)
if collision:
print("Collision with: ", collision.get_collider())

It only prints collision with walls.

Thank you for the future answers.