bug fix softbody wind

-compensating factor 1000 that comes from 
pdDoEffectors() since Aug 2008
-give  particles and soft body vertices the same 
polarity on force fields.
This commit is contained in:
Jens Ole Wund 2009-01-28 12:34:22 +00:00
parent 7eae2080f2
commit 56d2dc7e7f

@ -1562,7 +1562,7 @@ static void _scan_for_ext_spring_forces(Object *ob,float timenow,int ifirst,int
/* note we don't use sb->mediafrict but use sb->aeroedge for magnitude of effect*/ /* note we don't use sb->mediafrict but use sb->aeroedge for magnitude of effect*/
if(sb->aeroedge){ if(sb->aeroedge){
float vel[3],sp[3],pr[3],force[3]; float vel[3],sp[3],pr[3],force[3];
float f,windfactor = 250.0f; float f,windfactor = 0.25f;
/*see if we have wind*/ /*see if we have wind*/
if(do_effector) { if(do_effector) {
float speed[3]={0.0f,0.0f,0.0f}; float speed[3]={0.0f,0.0f,0.0f};
@ -2392,7 +2392,7 @@ static void softbody_calc_forcesEx(Object *ob, float forcetime, float timenow, i
BodyPoint *bproot; BodyPoint *bproot;
ListBase *do_effector; ListBase *do_effector;
float iks, gravity; float iks, gravity;
float fieldfactor = 1000.0f, windfactor = 250.0f; float fieldfactor = -1.0f, windfactor = 0.25;
int do_deflector,do_selfcollision,do_springcollision,do_aero; int do_deflector,do_selfcollision,do_springcollision,do_aero;
gravity = sb->grav * sb_grav_force_scale(ob); gravity = sb->grav * sb_grav_force_scale(ob);
@ -2454,7 +2454,7 @@ static void softbody_calc_forces(Object *ob, float forcetime, float timenow, int
BodySpring *bs; BodySpring *bs;
ListBase *do_effector; ListBase *do_effector;
float iks, ks, kd, gravity; float iks, ks, kd, gravity;
float fieldfactor = 1000.0f, windfactor = 250.0f; float fieldfactor = -1.0f, windfactor = 0.25f;
float tune = sb->ballstiff; float tune = sb->ballstiff;
int a, b, do_deflector,do_selfcollision,do_springcollision,do_aero; int a, b, do_deflector,do_selfcollision,do_springcollision,do_aero;