When a curve guide animates, it doesn't correctly work on dynamic particles.
This because the guides work on a fixed starting position (the birth of
particle) and then defines a full path for the entire particle. It is clear
this was only coded with static particles in mind...

Nevertheless, I've added a line of code to at least put the curve guide
on correct location for the moment a particle gets born.

Report moved to the todo tracker; this should be a spec for particle recode
This commit is contained in:
2006-07-02 12:46:41 +00:00
parent e4354bbf12
commit 3c1956f5cd

View File

@@ -412,7 +412,10 @@ static void precalc_effectors(Object *ob, PartEff *paf, Particle *pa, ListBase *
if(pd->forcefield==PFIELD_GUIDE && ec->ob->type==OB_CURVE) {
float vec[4], dir[3];
if(!(paf->flag & PAF_STATIC))
where_is_object_time(ec->ob, pa->time);
/* scale corrects speed vector to curve size */
if(paf->totkey>1) ec->scale= (paf->totkey-1)/pa->lifetime;
else ec->scale= 1.0f;