Voxel Destroy Item

I have a voxel game, and I want to destroy items like a pickaxe. How would I do that, I am using LWJGL and Slick in case that helps a bit. Sorry for the broad question but if you point me on the right path I could find the answer.

Thanks Toby

I think I can answer your question, I just need a bit more information. Voxel engines could mean MANY things. 2D or 3D? How are your blocks handled (block[][]?)? What do you mean destroy? Remove “blocks”? Remove “items”? Remove blocks with items?

I think that you want to break blocks with a pickaxe correct? Well, you will need to raycast to find the block the player is pointing at, then you will need to see if the player is close enough to the block. If this is true then you will break the block by setting it to something like air.

[quote]Voxel engines could mean MANY things. 2D or 3D?
[/quote]
Actually, a voxel can technically only be 3D since voxel = volumetric pixel so… :slight_smile:

Yeah you are right this is a 3d Game. I have blocks being destroyed correctly and working but I want to get the pickaxe to be removed from the game and my inventory when it’s life runs out.

Real o-o Now I think this is a troll post. You mean programmed it to destroy blocks properly, but you cannot figure out how to remove pickaxe? Just remove it from your inventory item list.

Ehhhhhhhhh, you managed to do that but you can’t add a simple durability component to the pickaxe then remove it from the players inventory and chuck it to the side for the GC?..am I missing something here? lol

Okay Okay