Now we're going to do what we
intended to do in the first place. I just wanted you to
fully understand the
"sind- command". Rightclick-hold
pStone.translateY and choose "Break
Connections" . Now we deleted the
keys. If we hadn't baked it we would have broken the expression
by doing this. Set translateY to "0"
leave the stone alone.
We're going to use what we have just learned to create
the wobbleEffect for our plank. Let's directly trasferr
lines of code we found usefull earlier. Select plankBend
and click plankBendDeformer under INPUTS.
Rightclick-hold Curvature and release over
Expressions. Now write this into the expression-textField:
plankBendDeformer.curvature = sind(frame*58);
By looking at the line above you should be able to imagine
the plank go crazy. Click create to find out that
you're absolutely right :) "Ahrg, it's crazy, we have
to stop it!!". No problem.
plankBendDeformer.curvature = (sind(frame*58))*(plankControl.vibrateValue);
Let's try to animate it then. Grab plankControl and set
a key at frame 0, vibrateValue "0", a key at frame
vibrateValue "1" and at frame 57 set vibrateValue
back to "0".
Now it starts at impact and eases out over about 40 frames...
I had to tweek my expression to get it to look better. Remember
that you can edit expressions to fit your need. Here's what
plankBendDeformer.curvature = (sind(frame*78))*(plankControl.vibrateValue/3);
Now, all you have to do is animate the stone and tweek
the vibrateValue to match the animation.
Here's the relationship between the vibrateValue
and the curvature after modification of