Tilemap Collider 2D is too big for the sprites

Hi, in the image you can see the tilemap on which I’ve placed my walls, which I want the player to collide with. I added a Tilemap Collider 2D to it, but it’s way too wide. I’ve tried messing with the values of the component but to no result. All the tiles have their Collider Type set to Sprite. How do I fix this? Placing individual Box Colliders would take way too much work.
Thanks.

5167550--512723--Unity Forum 2.png

1 Like

You can edit the physics shape of each sprite in the unity sprite editor. There’s a dropdown at the top left corner to select physics shape and create a custom shape.

3 Likes

Thanks so much jeffreyschoch, it fixed the issue!

1 Like

Thanks helped me too