Skip to content

Commit 7d23ad2

Browse files
committed
Small change to make the script readable without scrolling horizontally
1 parent 13bf486 commit 7d23ad2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Examples/MeshCreatorExample.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ void Awake()
4141

4242
void Update()
4343
{
44-
// Make the vertices wobble independently
44+
// Make the vertices wobble
4545
for (int i = 0; i < meshCreator.MeshVerticesCount; i++)
4646
{
4747
MeshVertex meshVertex = meshCreator.MeshVertices[i];
48-
meshVertex.Position = meshVertex.Position.normalized * 2f * Mathf.Lerp(1f, 2f, Mathf.Abs(Mathf.Cos(Time.time + i / 4f)));
48+
float scale = Mathf.Lerp(2f, 4f, Mathf.Abs(Mathf.Cos(Time.time + i / 4f)));
49+
meshVertex.Position = meshVertex.Position.normalized * scale;
4950
}
5051

5152
// Update the mesh

0 commit comments

Comments
 (0)