Mesh.normals Manual     Reference     Scripting  
Scripting > Runtime Classes > Mesh
Mesh.normals

var normals : Vector3[]

Description

The normals of the mesh.

If the mesh contains no normals an empty array will be returned.

// Rotate the normals by speed every frame
var speed = 100.0;
function Update () {
var mesh : Mesh = GetComponent(MeshFilter).mesh;
var normals = mesh.normals;

var rotation = Quaternion.AngleAxis(Time.deltaTime * speed, Vector3.up);
for (var i=0;i<normals.Length;i++) {
normals[i] = rotation * normals[i];
}
mesh.normals = normals;
}