Tilemaps and Composite Colliders

--

This short article will show how to give the Tilemap colliders for the tiles and then use Composite Collider to combine all the individual tile colliders.

To give all of the tiles on Tilemap colliders, select the Tilemap and add the Tilemap Collider 2D component. Now all the tiles have a collider according to the Alpha of the sprite.

To combine the colliders into one, add the Composite Collider component to the Tilemap. That will also add a Rigidbody 2D. Then enable Used by Composite on the Tilemap Collider, and you will make a single collider from the Tilemap Collider.

--

--

Kyle W. Powers
Kyle W. Powers

Written by Kyle W. Powers

Unity Developer, Software Engineer, Game Developer

No responses yet