public void generateNodes(boolean allowDiagonals) {

        for (int i = 0; i < grid.length; i++) {
            for (int j = 0; j < grid[0].length; j++) {
                grid[i][j] = new Node(new Vertex(new Vector3f(i * TILE_SIZE, 0, j * TILE_SIZE)), heuristic, true);
            }
        }

        addManhattanNeighbours();
        if (allowDiagonals) {
            addDiagonalNeighbours();
        }
    }