How to stop mesh triangles from connecting across the mesh?

Hey! I have an issue where creating a mesh connects triangles across the mesh making spaghetti. Heres a screen shot:

Uhm, just don’t connect them across the mesh…

Seriously a Mesh itself does not “connect” or create any triangles on it’s own. If you created this mesh procedurally you created those triangles somewhere and probably did something wrong. You probably messed up the index calculation for some of your triangles or you placed some of the vertices at different indices where you didn’t expect them to be.

Since you haven’t shown a single line of code I just have no idea what you expect from us? If this is actually a marching cubes algorithm you’ve implemented on your own, good luck. We’re not a “fix-my-code-because-i-lost-control-over-it” service.:wink:

When in doubt, the answer is 42. Don’t Panic!