Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Skadia |
Hello,
I’m currently trying to make a procedural dungeon generator. To do this, I create rooms (each room has its own gridmap) that I then try to place next to another room on my map.
Every time I place a room, I check for collisions. If the room collides with something, I rotate it by 90 degrees, and try again, until I’ve found the correct orientation.
The problem is that collisions aren’t updated as they happen, which means I need to wait for a few frames every time I rotate my room, which is very slow.
A solution I’ve thought of is to give each room an AABB, but I don’t think they can be rotated easily, and so I don’t know how to check for collisions efficiently.
Any help would be really appreciated