系统仿真学报 ›› 2019, Vol. 31 ›› Issue (11): 2393-2401.doi: 10.16182/j.issn1004731x.joss.19-FZ0353

• 仿真系统与技术 • 上一篇    下一篇

基于射线检测的动态碰撞优化算法

李星1, 傅妍芳1, 王亮2, 陆承涛1   

  1. 1. 西安工业大学计算机科学与工程学院,陕西 西安 710025;
    2. 西北工业大学无人机重点实验室,陕西 西安 710025
  • 收稿日期:2019-05-13 修回日期:2019-07-19 出版日期:2019-11-10 发布日期:2019-12-13
  • 作者简介:李星(1995-),女,陕西宝鸡,硕士生,研究方向为网络仿真与建模。
  • 基金资助:
    民机专项(MJ-2016-F-18), 西安市科技计划高校院所人才服务企业工程类项目(2017075CG/ RC038(XAGY004))

Dynamic Collision Optimization Algorithm Based on Ray Detection

Li Xing1, Fu Yanfang1, Wang Liang2, Lu Chengtao1   

  1. 1. School of Computer Science and Engineering, Xi'an Technological University, Xi'an 710025, China;
    2. Key Laboratory of UAVs, Northwestern Polytechnical University, Xi'an 710025, China
  • Received:2019-05-13 Revised:2019-07-19 Online:2019-11-10 Published:2019-12-13

摘要: 针对基于Unity 3D的视景仿真系统中的碰撞检测不准确问题,设计并实现了一种基于射线检测的动态碰撞优化算法。通过八叉树分割三维虚拟场景,简化并缩小了仿真系统运行时对障碍物的检测范围;同时基于射线检测,根据障碍物的威胁程度量化系数和距离动态地为障碍物添加合适的碰撞器,完成碰撞检测。结果表明:在提升视景仿真系统画面流畅度的同时,该算法提高了视景仿真系统中碰撞检测的准确性,解决了真实环境与视景仿真系统碰撞效果不一致的问题。

关键词: 视景仿真, 射线检测, 碰撞检测, Unity 3D

Abstract: Aiming at the inaccurate collision detection problem in Unity 3D-based visual simulation systems, a dynamic collision optimization algorithm based on ray detection is designed and implemented. The 3D virtual scene is segmented by octree, which simplifies the detection range of obstacles during the operation of simulation systems. At the same time, based on ray detection, according to the quantization coefficient and distance of the threat degree of obstacles, an appropriate collision collider is dynamically added to the obstacles to complete collision detection. The results show that the algorithm not only improves the fluency of visual simulation systems but also increases the accuracy of collision detection in visual simulation systems, and therefore solves the problem of inconsistency between the real environment and the visual simulation system.

Key words: visual simulation, ray detection, collision detection, Unity 3D

中图分类号: