Jagger
04-20-2003, 08:52 AM
Hey guy’s im having a problem setting up an expression for a rig and im hoping one of you can give me an idea on how to approach this.
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).
Any ideas?
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).
Any ideas?
