Home Technical Talk

[Maya] Trouble when trying to set up stretchable IK leg

Hey everyone,

I'm still learning character rigging and I currently use a tutorial on youtube to help me with that [ame="https://www.youtube.com/watch?v=iUPbO9-iEWs"]the Video in question[/ame]

Unfortunately now I have reached an impass. When setting up the stretchable IK leg the tutorial uses the distance measurement tool to determine the distance between the thigh and the foot joint, while the end point for the distance tool is parented to the foot controller, so it moves with it.

qszjguc6.png

To make the stretch work the tutorial uses a Set Driven Key to control the Translate X attribute of the Shin joint via the Distance attribute of the measurement tool. this is done with a Script:
string $driver = "leftLeg_IK_lengthShape.distance";
float $leftThighLength = `getAttr leftShin_IK_JNT.translateX`;
float $leftShinLength = `getAttr leftFoot_IK_JNT.translateX`;
float $sumLength = $leftThighLength + $leftShinLength;

setDrivenKeyframe -currentDriver $driver -driverValue $sumLength -attribute "translateX" -value $leftThighLength leftShin_IK_JNT;

setDrivenKeyframe -currentDriver $driver -driverValue ($sumLength*2) -attribute "translateX" -value ($leftThighLength*2) leftShin_IK_JNT;

After settig both of these Keys everything looks fine, and in the Graph Editor both Keyframes are where they should be. But as soon as I move the Foot Controller, the Length of the Thigh is set to twice the standard length and stays that way.

orqnetzv.png

The Keys I have set are both still where they should be in the Graph Editor, but when I set the interpolation to Linear between both keys the whole leg goes bat s*** insane.

kkgzqfxm.png

I have tried to create these Driven Keys alternatively via the Set Driven Key Editor and also manually in the Node Editor but in both cases the outcome is the same, that once I move the foot controller the whole thing breaks.

Is there a way to fix this or would I have to go with another method to set up the stretch? In case I would have to do it another way I would also appreciate any help I could get, because I dont think I'm like to get this on my own xD.

All help and input is welcome and greatly appreciated!

greetings,

Panic
Sign In or Register to comment.