Best Collider class for dynamic, flat, tiled floors?

I’m building a dynamic tile/cell-based maze with collision detection on walls and floor. The floor won’t be continuous, and if for example a pit trap is activated, the floor geometry would change on that cell. Besides, my floor texturing needs to change on a cell-by-cell basis. So I don’t think a single large TerrainCollider is what want.

I’m wondering what the best method would be? e.g. for each floor tile I could:

-Use a small TerrainCollider created at runtime? I’m still not sure TerrainColliders are the thing as they seem to be geared to designing terrain, while I’m doing all the floor modelling in Blender to place as prefab instances.

-Use a BoxCollider? If so can it be zero-thickness, thus being a plane rather than a box?

-Simply go for a MeshCollider? Thought this might be slower though?

Your thoughts?

Also, I’ve seen games (The Elder Scrolls series, notably) where you can actually get stuck in / fall through an edge and basically topple out of a dungeon, falling forever through the digital void :twisted:. Is this phenomenon likely to occur if I have separate floor tiles (even if I align them perfectly)?

The primitive colliders (box, sphere and capsule) are best if you can manage with them. They are more CPU efficient than mesh colliders and have fewer niggles generally. If you are constructing the game world dynamically, then having thin box colliders on the tiles may be the best way to go. In the case of the pit traps, you might be able to get away with setting Physics.IgnoreCollision temporarily between the player and the floor. If this is OK, you may only need a single large box collider for the whole floor rather than separate colliders for each tile.

Thanks andeeee… about 4 days late I know, thought I was subscribed to this thread since I created it! That tip re the detection of pits is a way I wouldn’t have thought of addressing the problem. One large floor definitely sounds more efficient, I may give that a go unless I actually wind up wanting to do something more complex with floor topology.