官术网_书友最值得收藏!

Circle collision detection

The most basic kind of collision detection is circle or distance collision detection. If we treat all of our colliders like little circles with a radius and a position, we can calculate the distance between the two locations and see whether that distance is less than the sum of our radii. This form of collision detection is high-speed, but precision is limited. If you look at the projectile in our game, this method works pretty well. Our spaceships, on the other hand, don't fit neatly into a circle. We can adjust the radius of our circle collider on any given ship to give slightly different results. When circle collision detection works, it can be very efficient:

Circle collision hit test
主站蜘蛛池模板: 怀仁县| 新营市| 莱西市| 凤阳县| 静宁县| 文昌市| 前郭尔| 嘉祥县| 旺苍县| 临猗县| 沽源县| 镇宁| 博兴县| 宜城市| 历史| 海伦市| 铜陵市| 肇州县| 宝清县| 泽州县| 平罗县| 望都县| 大关县| 红河县| 济南市| 双桥区| 红安县| 泰兴市| 桑植县| 昌邑市| 澄迈县| 雷山县| 资中县| 高安市| 浦城县| 外汇| 平远县| 明星| 桐梓县| 梁山县| 白玉县|