You cold fix it by checking if the spawning rock is colliiding with an already placed rock or is in a ceratin radius of it. If it is, it chooses a different position to spawn. It repeats that until it has found a place with no rocks underneath. My recommendation... A way would be to use Colliders as triggers for the rocks.