I believe what you need to take under notice is the above link that @toby posted and also collision code from games (probably a sphere around each drone but for protecting the drones) and at last start moving from the outer layers if you go outside or from the inner layers if you go inside the "3d structure".