IMPORTANT :-
the blocks values should be unique and incremental, correct code :-
public enum Block : ushort {
Null = 0x0000,
Air = 0x0001,
Stone = 0x0002
}
https://github.com/BLaZeKiLL/UnityVox...
Playlist - • Unity Job + Burst Tutorial : Voxel Te...
Voxel Chunks in Unreal Engine 4 - • UE4 Voxel Terrain Tutorial
Great Series explaining anatomy of a runtime cube in unity - • Procedural Mesh Tutorial, Part 8: Cub...
Block Data -
public static readonly Vector3[] Vertices = {
new Vector3(1, 1, 1),
new Vector3(0, 1, 1),
new Vector3(0, 0, 1),
new Vector3(1, 0, 1),
new Vector3(0, 1, 0),
new Vector3(1, 1, 0),
new Vector3(1, 0, 0),
new Vector3(0, 0, 0)
};
public static readonly int[][] Triangles = {
new[] { 0, 1, 2, 3 },
new[] { 5, 0, 3, 6 },
new[] { 4, 5, 6, 7 },
new[] { 1, 4, 7, 2 },
new[] { 5, 4, 1, 0 },
new[] { 3, 2, 7, 6 }
};
Follow me on Insta - / code.blaze
#Unity
#Programming
#WithMe