Alright, so I’ve got a pretty good voxel world going right now (Random world generation, divided into chunks, physics, etc.), so I’ve decided to try to allow the player to break blocks, so I read up on ray tracing, and I’ve got it going great, the player can break the top layer of blocks… However any layers under that aren’t being picked up by the ray trace, so I marked the collision with a sphere, and it turns out that the ray is still colliding with the original block (the one on the top layer…).
My Update Chunk Method:
- Get every face that is adjacent to air, and get it’s vertices and UV mapping, and then store them in an arraylist.
- Take the arraylists, convert them to array, and then use them to update the mesh buffer.
- Call UpdateBounds() for the mesh, and UpdateModelBounds() for the spatial.
- Remove the rigid body control, create a new one, and finally attach the new rigid body control.
Is there anything that I’m obviously missing? If not, I can make a test-case…