-
Notifications
You must be signed in to change notification settings - Fork 29
VoxelTool
Christian Cuevas edited this page Jan 12, 2021
·
1 revision
VoxelTool is used to construct voxel Meshes using provided voxel data and VoxelSet.
Using VoxelTool you can create custom voxel content without using VoxelObjects.
Note: VoxelTool is declared with class_name VoxelTool
, which means that while Voxel-Core is active, you can access VoxelTool from anywhere without having to load it.
var node := MeshInstance.new()
var vt := VoxelTool.new()
var voxel := Voxel.uvd(Vector2(3, 2), {}, Color.green)
vt.begin([VoxelSet], true)
for face in Voxel.Faces:
vt.add_face(voxel, face, Vector3.ZERO)
node.mesh = vt.commit()