I'm trying to rig a cube that has a speed control on the rotateZ axis. I've tried the expression below, but as I turn the custom attribute "pcube.speed" from 1 to 0, the rotate of the cube spins backwards to reset the rotate.Z to zero.
pCube1.rotateZ = (time) * pCube1.speed;
I understand why my expression doesn't work, but i don't know enough MEL to write an expression that controls the speed of the rotation such that the cube slows to a stop, and not rewind back to pCube1.rotateZ = 0.
Thanks in advance.