Okay, so i have a pretty basic script that makes planes have waves on them (I´m using it for a water based game)
function Update () {
var mesh : Mesh = GetComponent.<MeshFilter>().mesh;
var vertices : Vector3[] = mesh.vertices;
for (var i = 0; i < vertices.Length; i++)
{
vertices<em>.y += Mathf.Sin(Time.time * speed+ baseHeight<em>.x + baseHeight<em>.y) * (scale*.5) + Mathf.Sin(Time.time * speed+ baseHeight<em>.z + baseHeight_.y) * (scale*.5);_</em></em></em></em>
}
GetComponent.().sharedMesh = mesh;
mesh.vertices = vertices;
mesh.RecalculateBounds();
}
The problem is that the plane has a limited size. I can put two planes next to each other but their waves will not connect.
[84980-unity-5-two-planes.png|84980]
What would be the best way to connect multiple plane vertices together (Or should i just create a custom model and manipulate its vertices)