Quick answer: Add a CompositeCollider2D + Rigidbody2D (Static) to the Tilemap, set the TilemapCollider2D’s Used By Composite to true, and Geometry Type to Polygons. Adjacent tiles merge into one continuous polygon and the player stops snagging on tile seams.

Players ice-skating across your tilemap floor and randomly stopping mid-stride? The problem is not your movement code. It is the tilemap collider, which is producing one tiny collider per tile and the player’s capsule is catching on the seams between them.

The Symptom

Player walks across a flat row of tiles. Sometimes movement halts. Sometimes a jump fails because the velocity gets eaten by an invisible vertical edge between two tiles. Raycasts down to check “is grounded” flicker between true and false at tile boundaries.

What Causes This

TilemapCollider2D, by default, generates a separate Box-shaped collider for every solid tile. Two adjacent tiles share an edge in screen space but do not share collider geometry. A CapsuleCollider2D (or any non-zero-radius collider) crossing that edge is briefly in contact with both colliders, and Box2D resolves the contact by pushing the player back along the seam normal — which points up out of the tilemap and stops horizontal motion.

The Fix

Step 1: Add the components. On the GameObject that holds the Tilemap and TilemapCollider2D, add:

Tilemap GameObject:
  - Tilemap
  - TilemapRenderer
  - TilemapCollider2D
  - CompositeCollider2D     // added
  - Rigidbody2D             // auto-added by Composite, set Body Type = Static

Step 2: Wire the TilemapCollider2D to the composite. On the TilemapCollider2D component, check Used By Composite. The per-tile shapes are now consumed by the composite and do not produce contacts directly.

Step 3: Geometry Type = Polygons. On the CompositeCollider2D, set Geometry Type to Polygons. This produces one closed polygon per connected region, which is exactly what a floor or wall should be. Outlines is for hollow shapes and is the wrong choice for solid terrain.

Step 4: Regenerate when the tilemap changes. If you place or remove tiles at runtime, call compositeCollider.GenerateGeometry() after the change. The composite does not auto-rebuild on every SetTile.

Verifying It Worked

Enable the Physics 2D gizmos (Window → Analysis → Physics Debugger). The collider should appear as a single thick outline around the entire floor, not a grid of cells. Walk the player across the floor; the snag is gone.

One Gotcha: Slopes

Polygons mode merges into convex pieces. Pure 45° slope tiles work fine; mixing slopes with steps can produce unexpected polygon splits. If your level has complex slope geometry, a custom EdgeCollider2D path drawn over the relevant region is more predictable than relying on the tilemap collider.

“Composite the tilemap. Polygons geometry. Static rigidbody. The seams disappear and the player walks straight.”

Related Issues

For player getting stuck on slopes, see 2D character on slopes. For ground-check raycast flicker, see isGrounded flicker.

Composite. Polygons. Used By Composite. The player glides.