Skip to content

Commit

Permalink
✍🏻Fix errors with #3 Planet.cs | Rendering specific faces
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Nov 2, 2021
1 parent 85334b8 commit c4e8c14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/PCG/Planet Procedural Generation/Scripts/Planet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void Initialize()
}

terrainFaces[i] = new TerrainFace(shapeGenerator, meshFilters[i].sharedMesh, resolution, directions[i]);
bool renderFace = faceRenderMask == faceRenderMask.All || (int)faceRenderMask - 1 == i; // Is the currently selected face the one we want to render?
bool renderFace = faceRenderMask == FaceRenderMask.All || (int)faceRenderMask - 1 == i; // Is the currently selected face the one we want to render?
meshFilters[i].gameObject.SetActive(renderFace);
}
}
Expand Down Expand Up @@ -82,9 +82,9 @@ public void OnColourSettingsUpdated()

void GenerateMesh()
{
for(int i = 0; i < max; i++) {
for(int i = 0; i < 6; i++) {
if(meshFilters[i].gameObject.activeSelf) {
terrainFaces[i].ConstructMesh;
terrainFaces[i].ConstructMesh();
}
}
}
Expand Down

0 comments on commit c4e8c14

Please sign in to comment.