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); } }
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); } }