I am making a Minecraft clone, and I have a small chunk system, so far just one chunk, but it keeps breaking. textures work good, so do most face renderings of each cube in the chunk. Everything is properly culled, however the issue arises when placing or destroying blocks. My chunk size is 17x17x17, (In actuality its 16x16x16) and if I place a block, it distorts all blocks textures, by swapping them from 16x16x16 to wherever the player placed a block or near it. It also causes from the same coord of 16x16x16 to have faces disappear. And if you reverse what the player does, almost in a ordered fashion the visual glitches and texture swapping reverses little by little until the chunk is back to how its supposed to be. I will share some videos and screenshots, and am completely willing to share the project files if need be.
Video Link to the issue: https://www.youtube.com/watch?v=hq36Io7giXQ&ab_channel=MrMorgan
Unfortunately, I do not have enough space to share the code, so instead I will share the GitHub page of the project
The code is in the package ChunkUtilities with ChunkMesh being the main code thats the issue.
Any help is greatly appreciated!
Contribute to bmo316/voxelGame development by creating an account on GitHub.