-
Notifications
You must be signed in to change notification settings - Fork 238
Open
Description
Code-A-Game-Like-Minecraft-In-Unity/01-the-first-voxel/Assets/Scripts/Chunk.cs
Lines 17 to 29 in 81dfe22
| for (int p = 0; p < 6; p++) { | |
| for (int i = 0; i < 6; i++) { | |
| int triangleIndex = VoxelData.voxelTris [p, i]; | |
| vertices.Add (VoxelData.voxelVerts [triangleIndex]); | |
| triangles.Add (vertexIndex); | |
| uvs.Add (VoxelData.voxelUvs [i]); | |
| vertexIndex++; | |
| } | |
| } |
This loop generates 6 vertices per face when it should be 4 vertices because 2 triangles on one cube face should share 2 vertices.
Metadata
Metadata
Assignees
Labels
No labels