예제 #1
0
		void preCalculateFloatingObjects(){
			foreach (Transform t in floatingObjects) {
				FloatingObject fo=new FloatingObject();
				fo.t = t;
				for (int i=0; i<vertices.Length; i++) {
					if(Vector3.Distance(vertices[i],t.position)<=1.1f){
						fo.vertices.Add(i);
					}
				}
				internalFloatingObjects.Add(fo);
			}
		}
예제 #2
0
 void preCalculateFloatingObjects()
 {
     foreach (Transform t in floatingObjects)
     {
         FloatingObject fo = new FloatingObject();
         fo.t = t;
         for (int i = 0; i < vertices.Length; i++)
         {
             if (Vector3.Distance(vertices[i], t.position) <= 1.1f)
             {
                 fo.vertices.Add(i);
             }
         }
         internalFloatingObjects.Add(fo);
     }
 }