Added collision detection for flying up/down