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

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
主站蜘蛛池模板: 岢岚县| 达孜县| 仙居县| 温州市| 建水县| 洪江市| 遂川县| 榆社县| 和龙市| 丰宁| 溧阳市| 商洛市| 广东省| 虎林市| 将乐县| 小金县| 龙山县| 贵定县| 阳原县| 乐东| 邵阳市| 手机| 常州市| 遂溪县| 尚义县| 茌平县| 普格县| 香格里拉县| 连南| 乌兰浩特市| 广元市| 无为县| 灵川县| 张家港市| 南昌县| 偃师市| 泗阳县| 荃湾区| 林甸县| 大冶市| 望谟县|