private void ConnectBattleGrid(float connectDistance)
        {
            if (battleGrid == null)
            {
                return;
            }

            float connectionDistanceSqr = connectDistance * connectDistance;

            for (int i = 0; i < 4; i++)
            {
                Directions directionFrom = (Directions)i;
                Directions directionTo   = Enums.Opposite(directionFrom);

                Graph neighbourGraph;
                if (TryGetNeighbour(directionFrom, out neighbourGraph) == false)
                {
                    continue;
                }

                BattleGrid neighbourBattleGrid = neighbourGraph.battleGrid;

                if (neighbourBattleGrid == null)
                {
                    Debug.LogWarningFormat("somehow i have battle grid but my neighbour is not. probably just empty graph. my positions is {0}", chunk.position.ToString());
                    continue;
                }

                var ourBorder       = battleGrid.GetBorderLinePoints(directionFrom);
                var neighbourBorder = neighbourBattleGrid.GetBorderLinePoints(directionTo);

                Axis projectionAxis = Axis.x;
                if (directionFrom == Directions.xPlus || directionFrom == Directions.xMinus)
                {
                    projectionAxis = Axis.x;
                }
                if (directionFrom == Directions.zPlus || directionFrom == Directions.zMinus)
                {
                    projectionAxis = Axis.z;
                }

                BattleGridPoint point;
                foreach (var ourBorderPoint in ourBorder)
                {
                    point = null;
                    float curClosestSqrDist = float.MaxValue;
                    foreach (var neighbourBorderPoint in neighbourBorder)
                    {
                        if ((projectionAxis == Axis.x && ourBorderPoint.gridZ != neighbourBorderPoint.gridZ) ||
                            (projectionAxis == Axis.z && ourBorderPoint.gridX != neighbourBorderPoint.gridX))
                        {
                            continue;
                        }

                        float curSqrDist = SomeMath.SqrDistance(ourBorderPoint.positionV3, neighbourBorderPoint.positionV3);

                        if (curSqrDist < curClosestSqrDist && curSqrDist <= connectionDistanceSqr)
                        {
                            point             = neighbourBorderPoint;
                            curClosestSqrDist = curSqrDist;
                        }
                    }

                    if (point != null)
                    {
                        ourBorderPoint.neighbours[(int)directionFrom] = point;
                        point.neighbours[(int)directionTo]            = ourBorderPoint;
                    }
                }

                //for (int bi = 0; bi < ourBorder.Length; bi++) {
                //    foreach (var curPoint in ourBorder[bi]) {
                //        BattleGridPoint nbpn = null;
                //        float curClosestSqrDist = float.MaxValue;
                //        foreach (var neighbourPoint in neighbourBorder[bi]) {
                //            float curSqrDist = SomeMath.SqrDistance(curPoint.positionV3, neighbourPoint.positionV3);
                //            if(curSqrDist <= connectionDistanceSqr) {
                //                nbpn = neighbourPoint;
                //                curClosestSqrDist = curSqrDist;
                //            }
                //        }

                //        if(nbpn != null) {
                //            curPoint.neighbours[(int)directionFrom] = nbpn;
                //            nbpn.neighbours[(int)directionTo] = curPoint;
                //        }
                //    }
                //}
            }
        }