Dungeon Architect

Ah, sorry should have told you this earlier. Now that I think of it, the theming engine runs in a separate thread and is not allowed to spawn actors from a non-game thread. So I queue all the spawning commands and finally run them all in the game thread.
So, you cannot check for physics collisions since the previous dungeon objects would not have been spawned by the time you check for collisions

Order of execution:

  • Generate Layout
  • Create mesh & actor spawn commands (with position / rotation), but don’t spawn them
  • After the generation thread ends, go back to the main game thread and run all the commands (to actually spawn the meshes) over multiple frames to avoid lag

As a workaround, would it be too costly to make these objects Movable with physics enabled? If not, you could just spawn them (even if they collide) and when the game starts, the physics engine would would recover the colliding objects over the next few frames
Colliding cubes

Runtime (penetration recovery by the physics engine)