Combine multiple floor colliders into 1 large seamless one

Hi all and thanks for reading.

I am currently making a game in which the player rolls a ball around a course/maze with various obstacles etc. I plan to have quite a few levels so I have prefabbed a 1x1 tile with which to build the floor for the courses. Each tile has a box collider component. Aside from the performance hit from 30+ colliders when 1 would do the trick, I also get some weird behaviour whereby when the ball rolls across a ‘seam’ between 2 tiles it jumps, as if hitting a very small step. I assume that this is because the ball is colliding with the edge of the next collider (I’ve double checked y heights etc) and so I was wondering if there was a way to maintain the building block prefabs but combine the colliders once the level has been built? I’ve done some research and seen quite a lot on the internet wrt combining meshes in code - would I have to do that and then generate a new collider around the new mesh or is there a better way?

Thanks very much!

Hi!
is your floor flat? If yes, maybe better to use one big plane with flat mesh collider instead of a lot of small ones (you can turn of Mesh Renderer so no effect on your graphic)

Hi, thanks for replying! It is flat at the moment however I plan to implement curved surfaces at a later point so wouldn’t be able to use flat mesh colliders for that. If needs be I suppose I can just make a custom floor & collider for each level but was really hoping to be able to combine the prefabbed tiles in some way as it will save me a lot of time.

I’m having the exact same seam problem.
I did some google and discovered this that might explain why your ball jumps.
https://www.iforce2d.net/b2dtut/ghost-vertices