Skip to content

Format

typescript
Mesh.RecalculateNormals()

class: Mesh

Description

Recalculates the normals of a mesh based on the triangles and vertices.

It is useful to update the normals to reflect changes after modifying the vertices. The normals are calculated based on all shared vertices. Sometimes imported meshes do not share all vertices. For example, vertices at UV seams are split into two vertices, so the RecalculateNormals function creates normals that are not smooth at the UV seams.

Parameters

param_nametypedescription

Return

typedescription
void

Code Example

typescript
let mesh = Resources.Load<Mesh>(Mesh, "meshId");
mesh.RecalculateNormals();