"Get Voxel At Position" API call

At the moment it is possible to set a voxel at a position runtime using the SetVoxel API call of the VoxelMesh VoxelMesh - Crayta API Docs

Would it be possible to get the type of voxel at a position at runtime, something like:
VoxelAsset voxelComponent:GetVoxel(Vector pos)

The reason for this is that as the composition of a voxel mesh can change at runtime, it would be nice if creators can also interrogate the composition of Voxel Meshes at runtime. A use-case would be a paintball game where the points are calculated based on how many voxels the player has changed.

It would also be amazing to have API calls that could count how many of a voxel type exist within a VoxelMesh, which would have uses including the paintball game, but also could extend for other game types. Something like:
Number(int) voxelComponent:GetVoxelsOfType(VoxelAsset voxelAsset)

3 Likes