Example #1
0
    public void GenerateMesh(float surfaceCrossValue, Planet planet, int size)
    {
        Mesh mesh = new Mesh();

        WorldMeshGenerator.FillMesh(ref mesh, _chunkX, _chunkY, _chunkZ, planet, size, _planetSettings.worldHeight, surfaceCrossValue);
        _meshFilter.mesh         = mesh;
        _meshCollider.sharedMesh = mesh;
    }
Example #2
0
    public void GenerateNewMesh(float surfaceCrossValue)
    {
        Mesh m = new Mesh();

        WorldMeshGenerator.FillMesh(ref m, (int)transform.position.x, (int)transform.position.y, (int)transform.position.z, parentWorld, size, height, surfaceCrossValue);
        this.meshFilter.mesh         = m;
        this.meshCollider.sharedMesh = m;
    }