When avoiding, calculate the size of both buildings individually on X and Z axed. This makes sure small and large buildings will never conflict while having the chance to spawn as close as possible, and makes the "distance" parameter optional