- Home /
Question by
nirast · Mar 12, 2019 at 10:07 AM ·
physics2dcollider2ddungeon
Overlap elimination with 2d physics engine for dungeon generator not working properly.
Ok, to make the tile a bit more clear: I'm trying to make a 2d dungeon crawler where the dungeons are generated randomly. So far, I'm able to generate multiple rooms (each one being tilemap grid with an attached generated map as a child), and then I randomly generate them in the game world. The end result should be something like this: The problem is, some of the grids remain overlapped. Here's an example of a dungeon generated this way (I'm not sure how well you can tell what the problem is): Any tips on how to fix this? I'll post the Rigidbody2D and BoxCollider2D of the grid in the comments, since I'm only allowed 2 attachements.
zv2kymv.gif
(274.9 kB)
screenshot-34.png
(48.2 kB)
Comment
The rigidbody and box collider, as well as the physics material:
screenshot-35.png
(31.9 kB)
screenshot-36.png
(1.8 kB)