Hello!
In my haphazard adventures in coding a voxel game, I have hit an unusual error. Since I am developing on mobile, I cannot see where the error here is. In game.js from lines 67-70 is the possible issue, though I was just working on generating indicies when it popped up. If someone knows the issue, any help is appreciated. Also. If you guys see any possible changes that should be made, make a suggestion!
However, I do not see exactly how this is going wrong. If you mean for me to not include the update, the vertex format breaks. Surprisingly, I was actually using the example you provided as the framework for me making this code! Could you give a direct edit suggestion on what I need to change? I’m afraid that my lack of experience puts me at a disadvantage in rooting out the issue.
I looked at the code closer and noticed a bigger issue… somehow the variables verts, norms, etc. are not being filled at all, not even in the function itself. If you look at the generateChunk() function, they are defined and filled with the push() method! Or should be.
Oh wow, that was dumb of me. I fixed it now! And, the mesh displays, but very oddly. I will be able to fix it now that I can see it visually. Thank you for your help!
I do not mean to annoy you, but if you look at the code again, and the image of the generated mesh, you will see something odd. I think I am connecting the vertices wrong, but I do not see how. Also, I do not see multiple chunks, as there should be at least 4 there.