HertzVox-2
HertzVox-2 copied to clipboard
No documentation (HOW DO I USE THIS)
How am I supposed to use this without any documentation? I need a voxel engine for my game
I'm look for a voxel engine to replace my gameobject-based block building system
Hi!
Yeah, the documentation is really lacking for this project. I'll do my best to help you get started, but please keep in mind that development on this project has ceased and I probably won't update it any further!
Here is the whole project with the example included. I'll be basing most of my help on this.
To generate a world, you'll need a game object with the VoxelWorld
script attached. Then on the same object, you'll need a script that generates a world. There's a HertzVoxExampleWorld
script in the example that generates a flat world.
To make your own world generator, you'll need a script that implements the IVoxGeneration
interface. Then you'll need to implement the BuildChunk
method that must return a Unity job.
Your player/camera should have the VoxelLoader
script attached to make chunks load around the player. You can place other VoxelLoader
scripts in your scene to keep chunks loaded around that object.
Then, lastly, to place down voxels, you first need to get your block with Block myBlock = BlockProvider.GetBlock("block_name");
and then you can use that block to set a voxel with Voxels.SetBlock(new int3(12, 12, 12), myBlock);
.
I hope this helps you!