Activity › Forums › Adobe After Effects Expressions › Dan Ebbert’s IK Expression
-
Dan Ebbert’s IK Expression
Posted by Saif Khan on January 24, 2017 at 7:52 pmThis 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]))Saif Khan replied 9 years, 7 months ago 2 Members · 5 Replies -
5 Replies
-
Dan Ebberts
January 24, 2017 at 8:27 pmDid you apply all three expressions to the Transform effect for each foot?
Dan
-
Saif Khan
January 24, 2017 at 8:40 pmI 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
-
Dan Ebberts
January 24, 2017 at 8:48 pmI 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]);
-radiansToDegrees(Math.atan2(v[1],v[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
-
Saif Khan
January 24, 2017 at 9:08 pmOk 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
-
Saif Khan
January 25, 2017 at 7:39 pmSo 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.
Reply to this Discussion! Login or Sign Up