Tilemap Collision with Player not working

Hi there,

I am quite new to Unity and created a small project with tilemaps (Ground, Water and Vegetation) and a player. I do not want the player to walk over water, so I added some colliders on the water tilemap. However, the player is still able to walk through the tiles…

Specifically, my water tilemap is on the water sorting layer, has a static rigidbody, a tilemap collider set to use composite collider and that composite collider. My player is on the character layer and also has a rigidbody (kinematic) and a capsule collider. I already tried changing the sorting layers and checked the z position.

I also watched several tutorials about this but cannot figure out my problem. I would appreciate any help!
Thanks :slight_smile:


Hi! I’m new too.

I think you need to add logic to check if the collision happens. Then if it happens, stop the player’s movement.

Oh, is that really so? I really thought I watched multiple tutorials where they didn’t code anything for this but that would of course work. Thanks, I will add a script!