My code generates a mesh and uses noise to make it look like a natural landscape. To add world borders I made it so at a certain distance the heigh would be plugged into a function and start to decrease. It worked, however, the mesh now has holes in it, the collisions are completely broken, and the game experiences intense frame drops. Any clue what might be causing it?
#World Generation Issues
8 messages · Page 1 of 1 (latest)
Is it possible that at a certain point the height function at a position is ever negative?
This could be throwing off the normals for your polygons resulting in some faces appearing when viewed from the top and others appearing when viewed from the bottom, making it look like there are "holes".
I assume this could also be giving collision generation heart palpitations as it doesn't know what side you should collide with
That explanation sounds plausible
Maybe flipping the normals on the vertexes that break will fix it, i just have to find out how
There are edge cases there to do with how many vertices of a polygon are negative, too, I'm not sure how the normals are generated under the hood