Box colliders laid side by side are uneven and causes bumps when the player moves from one collider to another.

I’m currently making a puzzle game (for android) and the game requires the player to move a box across the map.

The world is made of platforms that the boxes sit on and the player can tap the screen to slide the boxes left/right.

I generate the platforms by reading positions of individual squares from a file and then I just create a GameObject at the specific location with a 2D box collider.

The issue is that occasionally when the player (which is a box) slides across a long stretch, the player gets knocked upwards or stuck, presumably by hitting the edge of a collider when moving from one platform to another.

Is there anyway I can prevent this from happening?

if you make all platforms a child of a gameobject with a composit collider and set used by composit to true on your platforms this will be fixed…