I have a method which takes in 4 vector3’s and then draws a triangulated mesh between them. I want to be able to pass in an array of vector3’s, with each set of 4 representing a separate mesh. how do I iterate through the array and create a mesh for each set of 4 points?
I assume this is what Unity does when you set a meshes triangles as that’s a single array with every 3 elements representing a triangle?
So you’ve already got the function that takes 4 points and makes a mesh?
Can we assume the points in the array are in groups of four? Or is there some other way of identifying which ones should be adjacent in the mesh?
In Unity when setting meshes, you set an array of vertices, (Essentially, your vector3s are identifying the vertices.) and then the triangles are indexes of those vertices, listed in groups of three to identify which vertices should be connected in the mesh.