I have an expression that works fine but I only want it to work when a controller is "not" moving (translate Z).
The problem is I donít know how to tell Maya to check if the controller is moving or not.
The only way I could think of setting this up was through something like this:
If controler.translateZ at current frame = controler.translateZ at next frame then expression = true
Unfortunately I donít know how to make the relationship between the translate and the frame.
If that isnít enough information, this is for an expression driven walk. This particular problem concerns the translate Y of my leg controller. Iíve set it up so all you have to do is move the legs forward and every thing else compensates for you.
The way I have the translate Y for my l_leg controller (IK) set up is like this:
$dif = (r_leg_controler.translateZ - l_leg_controler.translateZ);
if ($dif < 0)
$dif = -($dif);
l_leg_controler.translateY = -(($dif) -10)/1.5
Now this gives me a nice ark for the left leg when it steps forward, and it plants properly. But it repeats when the right leg comes forward which isnít right because at that point the left leg should be the balancing leg.
Working with this, I know the bend should only occur when the opposite leg is planted (no translate Z) and deactivated when the opposite leg is translating (stepping forward).