Etape 7

Sélectionnez Particleshape1 et ajoutez un autre attribut Array, nommé Gate. Ajoutez une expression Runtime sous particleshape 1.

particleShape1.index=rand(1,26);
vector $temp=particleShape1.worldVelocity;
if ($temp.y<=rand(-10,-5))
{ particleShape1.gate=1;};
if ($temp.y>=(-1))
{particleShape1.gate=0;};

if (particleShape1.gate==1){ particleShape1.acceleration=<<0,rand(20,25),0>>;
//print("aaaa");
};
if (particleShape1.gate==0) {
particleShape1.acceleration=<<0,rand(-25,-20),0>>;
//print("bbbb");
};

Ces expressions contrôlent l'accélération de chaque particule sur l'axe Y.
Jouez l'animation, et vous pourrez voir un bel aperçu de l'effet d'accélération.