-
Calculating Triangle Normals
Posted on 23 Jul 2022 - 13:10
Unity’s Mesh class nicely exposes the mesh’s topology and allows us to manipulate it with ease. The access to vertex positions, triangles and normals is immediate thanks to the availability of properties like Mesh.vertices, Mesh.triangles and Mesh.normals. Nonetheless, all developers who do any wizardry on meshes unavoidably come across a blind spot: triangle normals. Many think that Mesh.normals will give enough intormation to know what way the triangle is facing but they soon discover that the vectors that come with Mesh.