Cosmic collision and planets