ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Child-Parent linking - how to avoid inheriting rotation?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael CosnerChild-Parent linking - how to avoid inheriting rotation?
by on Oct 28, 2009 at 8:55:33 pm

Hey All,
I've got two layers in which I want the child to accept the position and scale values of the parent but *not* the rotation (to keep the orientation of the child level). Is there a simple way to do this? It's a trivial thing to do in 3D but I've never found a need to replicate it in After Effects until now. Thanks for any thoughts or advice.

Cheers,
Michael


Return to posts index

Dan EbbertsRe: Child-Parent linking - how to avoid inheriting rotation?
by on Oct 28, 2009 at 9:18:58 pm

It sounds like you need a counter-rotation expression for the child, like this:

value - parent.transform.rotation

The child's world postion will still be affected by the parent's rotation, but it will retain it's world orientation.


Dan





Return to posts index

Michael CosnerRe: Child-Parent linking - how to avoid inheriting rotation?
by on Oct 28, 2009 at 10:30:18 pm

Perfect, Dan. Works like a champ. Thanks for the mental nudge.

Cheers,
Michael


Return to posts index


Kala RackleyRe: Child-Parent linking - how to avoid inheriting rotation?
by on Apr 1, 2012 at 8:55:46 pm

I know that this is an old thread, but I figured instead of starting a new one, I would just tag on!

I am trying to keep a pedal rotating with a bike gear, but still face upward so that the foot can rest on it. I am getting ready to dive into Duik or Dan's IK expressions for the legs, and I have all of the wheels and gears going nicely with Carl Larsen's Vehicle Rig expressions.

However, I cannot get the pedals to stay upright! I have tried this expression you suggested: "value - parent.transform.rotation;". I am unsure exactly where to put it though. Rotation? Position? I have a null that is parented to the pedal "bar", which is parented to the gear. The pedals are parented to the nulls.

Help? Thank you!


Return to posts index

Dan EbbertsRe: Child-Parent linking - how to avoid inheriting rotation?
by on Apr 1, 2012 at 11:51:37 pm

There is probably more than one way to do it, but if it's the gear that's actually rotating, I'd apply this to the pedal:

value - thisComp.layer("Gear").transform.rotation;

Or, from your description, something like this should work:

value - parent.parent.parent.transform.rotation;

Dan



Return to posts index

Kala RackleyRe: Child-Parent linking - how to avoid inheriting rotation?
by on Apr 2, 2012 at 1:42:28 am

Dan,

I'm glad that it was you that responded! I've been reading your answers to other questions re: expressions, and it has been helpful. Thank you.

Can you please tell me where to add the expression? Under position or rotation? And under the Child object (pedal), right?

Thanks again!


Return to posts index


Kala RackleyRe: Child-Parent linking - how to avoid inheriting rotation?
by on Apr 2, 2012 at 1:46:34 am

Holy smokes. You got it. I've been trying to figure out which suggestion would work for hours!

For anyone else landing on this thread, I used
value - parent.parent.parent.transform.rotation;

and I placed it as an expression under Rotation for the Child layer.

Thanks again Dan!


Return to posts index

Dylan ByrneRe: Child-Parent linking - how to avoid inheriting rotation?
by on Jan 15, 2016 at 10:36:49 am

Hello! I'm tagging onto this post too, hope that's ok.

So I've been trying to use this expression but I'm having problems. Here's my situation:

I am making a fake hand puppet in AE, it is doing a running sequence (loop).

I have a torso, that rotates up and down as it runs, connected to that I have two upper arms that rotate and then two fore arms with hands that also rotate.

What I want to do is attach my fake puppet strings to the forearms to make it look like they are controlling the arms - basically they are vertical strings that I want to follow the position of the forearms but not the rotation of them or any of the other parents.

Looked at simply I have

Parent 1 rotating (torso) > Parent 2 rotating (upper arms) > Parent 3 rotating (Forearms) > Child - not rotating (strings)

What seems to happen when I use this expression is it removes the immediate parent's rotation but then inherits the rotation from the parent above it. Any thoughts? I hope this is clear enough ;)

thanks a lot!

Dylan


Return to posts index

Jim PerryRe: Child-Parent linking - how to avoid inheriting rotation?
by on Dec 22, 2016 at 3:09:28 pm

Thanks for this tip. I tried it and it worked for me. Thanks for passing along the knowledge.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]