// Use this for initialization
 void Start()
 {
     particles  = paritcle_container.GetComponentsInChildren <Particle>();
     shapeMatch = new ShapeMatching(paritcle_container);
     for (int i = 0; i < particles.Length; i++)
     {
         origin_cm += paritcle_container.transform.InverseTransformPoint(particles[i].get_position());
     }
     origin_cm /= (float)particles.Length;
 }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     vertices = gameObject.GetComponent <MeshFilter>().mesh.vertices;
     create_particles();
     shape_match = new ShapeMatching(duplicate);
 }