Harmonic effector force wasn't working properly at all. A silly vector normalization...
authorJanne Karhu <jhkarh@gmail.com>
Mon, 6 Apr 2009 23:23:36 +0000 (23:23 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Mon, 6 Apr 2009 23:23:36 +0000 (23:23 +0000)
source/blender/blenkernel/intern/effect.c

index 0338ec92414ab4f4ba5c4b1770df87f5bc8d532c..a6514ae7b87e707a5089cb93e7f2e473c6bfec7d 100644 (file)
@@ -442,14 +442,11 @@ void do_physical_effector(Object *ob, float *opco, short type, float force_val,
                        else
                                VecCopyf(mag_vec,vec_to_part);
 
-                       Normalize(mag_vec);
-
                        VecMulf(mag_vec,force_val*falloff);
                        VecSubf(field,field,mag_vec);
 
                        VecCopyf(mag_vec,velocity);
-                       /* 1.9 is an experimental value to get critical damping at damp=1.0 */
-                       VecMulf(mag_vec,damp*1.9f*(float)sqrt(force_val));
+                       VecMulf(mag_vec,damp*2.0f*(float)sqrt(force_val));
                        VecSubf(field,field,mag_vec);
                        break;
                case PFIELD_CHARGE: