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

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
主站蜘蛛池模板: 旬阳县| 安仁县| 故城县| 四川省| 十堰市| 襄城县| 湖北省| 珲春市| 慈溪市| 房山区| 佛教| 沽源县| 阿克苏市| 军事| 上饶市| 玛曲县| 铜鼓县| 札达县| 宁城县| 海城市| 岑溪市| 张北县| 吉安市| 长葛市| 龙山县| 华亭县| 道真| 万安县| 资源县| 卫辉市| 瑞安市| 阳原县| 治多县| 佛学| 江西省| 时尚| 静海县| 新津县| 启东市| 天镇县| 金川县|