Example #1
0
 void Update()
 {
     if (Input.GetButton("Jump"))
     {
         /*for(int i = 0; i < m_densityMap.Length; i++)
          * {
          *      m_densityMap[i] = Random.value * 2 - 1;
          * }*/
         mesh = mc.ComputeMesh(m_densityMap);
         GetComponent <MeshFilter>().mesh         = mesh;
         GetComponent <MeshCollider>().sharedMesh = mesh;
         //DrawNormals(mesh);
     }
 }