[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]bool detectcollision(int x1, int y1, int radis1, int x2, int y2, int radis2) { double xd, yd, Distance; //2d xd = x2-x1; yd = y2-y1; Distance = Math.Sqrt(xd * xd + yd * yd); if( radis1 + radis2 >= Distance) return true; //collision return false; //no collision }