ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Dan Ebbert's IK Expression

FAQ   •   VIEW ALL
 Dan Ebbert's IK Expression on Jan 24, 2017 at 7:52:35 pm

This piece of code is not working on the feet in my project. It is suppose to keep the feet horizontal. But not matter what it is not working at all. I am working in the latest Aftereffect CC

Thanks

```v = toWorldVec([1,0,0]); -radiansToDegrees(Math.atan2(v[1],v[0]))```

 Re: Dan Ebbert's IK Expressionon Jan 24, 2017 at 8:27:50 pm

Did you apply all three expressions to the Transform effect for each foot?

Dan

 Re: Dan Ebbert's IK Expressionon Jan 24, 2017 at 8:40:28 pm

I applied this code to the foot and then the other code to the 'lower leg' and 'upper leg'. The other code works wonderfully its just the foot transform code that resets to zero and stays zero. The code does not show any error but it is not working. I am applying all three pieces of the code to the rotation of the layer. The foot is parented to the 'lower leg' and the 'lower leg' is parented to the 'upper leg'

Saif

 Re: Dan Ebbert's IK Expressionon Jan 24, 2017 at 8:48:11 pm

I guess what I'm asking, is did you do all of these steps (from my web page):

...if you need to keep the feet level, you can do it by applying a Transform effect to each foot. You should then apply this simple expression to the Anchor Point and Position properties of the Transform effect:

anchorPoint

Then apply this expression to the Rotation property of the Transform effect:

v = toWorldVec([1,0,0]);

So you need to apply a Transform effect to each foot, then add expressions to the Position, Anchor Point and Rotation properties of the Transform effect as described above.

Dan

 Re: Dan Ebbert's IK Expressionon Jan 24, 2017 at 9:08:53 pm

Ok so I was not following the instructions carefully enough. Sorry about that. Did not not remember the Transform effect is different from the Transform of the layer.

But now that I have applied the expression per instructions the foot is offset its location. It is staying flat but the code 'anchorPoint' is setting the position to be the same as the anchor point. So when the rotation happens with the other expression the anchor is on the edge of the composition. The first problem is solved though.

-Saif

 Re: Dan Ebbert's IK Expressionon Jan 25, 2017 at 7:39:06 pm

So figured a work around the problem since the Upper Leg and Lower Leg are working fine. I made the foot be a shape layer and animated the rotation of the shape object inside the layer without touching the rotation of the layer itself. So in turn I have more control on what the foot does when on level ground or in the air.

P.S.
Shape layers are a god send that need more love from adobe devs. some shortcuts would be nice or the ability to color groups so they are less confusing to look at. Also hoping for some taper stroke effect eventually.

http://imgur.com/a/IH66T