- Home /
Question by
SamPromineo · May 11, 2016 at 02:11 PM ·
vertexmeshestriangles
Vertex triangles
Hi,
is there any way to get triangles of each vertex? I know i can do the opposite (get triangle's vertices) by:
for (int i = 0; i < mesh.triangles.Length; i += 3)
{
Vector3 p1 = mesh.vertices[mesh.triangles[i + 0]];
Vector3 p2 = mesh.vertices[mesh.triangles[i + 1]];
Vector3 p3 = mesh.vertices[mesh.triangles[i + 2]];
}
But is there a way to do the opposite without going through all triangles collection looking for the same vertex index? I want to avoid the 75000++ loops.
Thanks!
Comment
Your answer
Follow this Question
Related Questions
delete specific triangles / polygons in a mesh 2 Answers
How to fix "Meshes may not have more than 65000 triangles at the moment" ?! 1 Answer
Understanding verts and triangles in Unity 1 Answer
Mesh triangles don't match wireframe view? 0 Answers
How to Detect All Mesh Triangles Within a Given Area 2 Answers