How to create falling leaves with randomly rotation - part 2
Now we have to tell Maya to use that value "rotPP" for controlling the rotation of the particles. To do that go to the "instancer"-folder in the particle-shape node and in the Rotation-options set the Rotation to "rotPP" (the rotation-type you can leave at "none").
For testing the animation hit play. The leaves should tumble around and rotate randomly.
To control/stop the rotation when hitting a ground we have to edit the expression a little bit. First, create a second plane. Scale the plane up and place it a bit lower that it can serve as our ground. With that plane still selected, shift-select the particles and turn on "Make collide" (particles-menu) with the setting friction=0.8-1, depending on how fast you want to stop the leaves when hitting the ground.
If you hit play, you can see that the particles stop at the ground but keep on rotating, which is not what we want. To edit that we have to take the velocity of the particle into account. Again, open the Attribute-Editor of the particle-shape node and edit the runtime-expression by right-clicking on the "rotPP"-field in the "Per particle (Array) Attributes". WeŽll create a new variable that reads the velocity of each particle and divides that value by 2000:

float $vel = (particleShape1.velocity)/2000;

Now, instead of just adding a value of 0.001 to the rotPP-variable each frame, weŽll add the $vel-variable:

particleShape1.rotPP += $vel;

ThatŽs it. When the particles hit the ground they should stop rotating (since velocity=0 -> $vel=0 and nothing is added to the rotPP value). Another good thing about the velocity is, because of the turbulence field and the conserve-setting there are moments where the leaves almost "stand still in the air", thus have only little velocity at that time and ... you guessed right, donŽt rotate much - like in reality. On the other side, the faster they fall, the faster they rotate.
go back to part 1