China is a country with frequent earthquake disasters. After the occurrence of earthquake disasters, the key to disaster monitoring and rescue is to quickly obtain images of postdisaster areas. Unmanned aerial vehicle (UAV) path planning is the core of multi-UAV cooperative control. With the increasing popularity of UAVs, people with more complex living environments contact with UAVs more frequently, which also poses a challenge to the overall control of UAVs, making single UAV and even multi-UAV cooperative path planning become a hot research issue in recent years. The complexity of communication between aircraft in three-dimensional flight space and multidegree of freedom navigation makes multi-UAV cooperation more challenging. According to the research results at home and abroad, this paper takes multitarget tracking algorithm, ant colony algorithm, and hybrid particle swarm optimization algorithm as research methods. Based on virtual reality technology, by comparing the advantages and disadvantages of several algorithms, the research model of path optimization is established, and a multitarget detection method based on virtual reality technology is established. Through the analysis and improvement of multitarget tracking algorithm, ant colony algorithm, and hybrid particle swarm optimization algorithm, the path optimization problem of UAV after an earthquake based on virtual reality technology is studied. The results show that, compared with the previous research models, the overall optimization efficiency of UAV route is improved by 15%, which is more practical.