I am running the following code in unity, and everytime I run it, it comes out with an error of the Index being out of range. My thinking is that everytime I try to get the centroid for "triangle2", the index of Triangle 2 is -1, thus creating the error. Could you please explain what's happening? I'd really appreaciate it.
You mesh has a boundary loop. When you query for the neighbouring triangles of a boundary edge, one of the results is InvalidID as expected, since there's only one neighbouring triangle.
Hi,
I am running the following code in unity, and everytime I run it, it comes out with an error of the Index being out of range. My thinking is that everytime I try to get the centroid for "triangle2", the index of Triangle 2 is -1, thus creating the error. Could you please explain what's happening? I'd really appreaciate it.