I am using tilemap in unity for level building. I need colliders on my tiles. If I add a tilemap collider to the tilemap it generates a collider around the tile, however I need to edit these colliders and have different colliders for every tile.
How could i do this?
Wrong collider:
What i want to achieve:
In your case you have square tiles and the Tilemap Collider box fits it naturaly.
To edit the Tilemap Collider, go to the Sprite Editor in the Sprite you're trying to use and modify how you want it to by clicking in Custom Physics Shape
Then, once you have the right shape, reset your Tilemap Collider and you're good to go.
Updated Answer for newer versions of Unity 2019+:
You now have to open the sprite sheet in the sprite editor and then select "Custom Physics Shape" under the Sprite Editor dropdown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With