private void Start()
    {
        ClosestChunkHasChanged();   //Set variables for UpdateChunks()
        UpdateChunks();
        VerticesData finalData = CollectData(verticesData);

        vertices = finalData.verticesP();
        normals  = finalData.normalsP();
    }
Exemple #2
0
    private void GenerateChunks()
    {
        chunks = new List <Chunk>();

        List <VerticesData> verticesData = new List <VerticesData>();

        centers = new List <Vector3>();

        GenerateChunksOfFace(chunks, "xy", verticesData);
        //GenerateChunksOfFace(chunks, "xyz", verticesData);
        GenerateChunksOfFace(chunks, "zy", verticesData);
        GenerateChunksOfFace(chunks, "zyx", verticesData);
        GenerateChunksOfFace(chunks, "xz", verticesData);
        GenerateChunksOfFace(chunks, "xzy", verticesData);

        VerticesData finalData = CollectData(verticesData);

        vertices = finalData.verticesP();
        normals  = finalData.normalsP();
    }