bool GetIfWalkableTerrain(Vector2 p, float radius) { int r = Mathf.RoundToInt(radius / node_radius) - 1; TDTile t = TGMap.instance.TileFromWorldPoint(p); if (!t.IsWalkable) { return(false); } for (int x = -r; x <= r; x++) { for (int y = -r; y <= r; y++) { if (!t.GetNeigbour(x, y).IsWalkable) { return(false); } } } return(true); }