[Solved] Composite Collider 2D grid polygon generation issue

So I’m trying to dynamically destroy the tiles of 2 grids when they collide, but the polygon2d generation seems to be off. Its leaving behind lines where the tiles got destroyed. I’m not sure why this is happening, any ideas on how to get the grid to generate properly?
4479106--412048--Capture.PNG

This is the script that I have attached to both tilemaps
BreakOnCollision.cs

4479106–412066–BreakOnCollision.cs (1.82 KB)

Not sure if its the best solution, but its resolved by disabling the tile map collider, generating the polygons, enabling the collider, then regenerating the polygons again.

1 Like