2D Perlin noise has an X and Y axis so it’s basically a zigzag function.

please explain how to use the Mathf.PerlinNoise instead of Mathf.Sin to set the mesh coordinates abit randomly.

```
// Code from procedural examples to sine-ify a mesh
var scale = 10.0;
var speed = 1.0;
private var baseHeight : Vector3[];
function Update () {
var mesh : Mesh = GetComponent(MeshFilter).mesh;
if (baseHeight == null)
baseHeight = mesh.vertices;
var vertices = new Vector3[baseHeight.Length];
for (var i=0;i<vertices.Length;i++)
{
var vertex = baseHeight*;*
```

* vertex.y += Mathf.Sin(baseHeight_.x ) * scale; //<<<—THIS LINE PLEASE
vertices = vertex;
* }
mesh.vertices = vertices;
mesh.RecalculateNormals();
}*
EDIT-okay so here is a three-dimensional Perlin mashed deformation script, there are other noise functions on the forums that may have more control of the noise.
var scale = 0.40;
var speed = 1.0;
private var baseHeight : Vector3[];_*

*function Update () {*

** var mesh : Mesh = GetComponent(MeshFilter).mesh;**

** if (baseHeight == null)**

** baseHeight = mesh.vertices;**

** var vertices = new Vector3[baseHeight.Length];**

** for (var i=0;i<vertices.Length;i++)**

** {**

*_ var vertex = baseHeight*;
vertex.y += Mathf.PerlinNoise(baseHeight.x3+77,12) * scale;*

*vertex.x += Mathf.PerlinNoise(baseHeight*.z*2+77,22) * scale;**3+77,42) * scale;**vertex.z += Mathf.PerlinNoise(baseHeight*.y

*vertices**= vertex;*

** }**mesh.vertices = vertices;**mesh.RecalculateNormals();**}*_*