Moderators: Disciple, zlovatt

Topic Author
Posts: 3
Joined: Mon May 21, 2007 1:49 am

need script for offset position

Thu Nov 15, 2007 4:07 am


I want to change the position of one layer and the position of the other layer should follow them. But if I link the position the second layer jumps to the position of the first layer. I want to keep the position in an offset.

what I want to do:

I set up a character standing in front of a mirror. If he lift his arm the mirrored arm shall move as well. Independent of how far he is standing from the mirror.

Topic Author
Posts: 3
Joined: Mon May 21, 2007 1:49 am

Thu Nov 15, 2007 4:34 am

so far this works:

thisComp.layer("arm_right").transform.position+temp = thisComp.layer("backview").transform.anchorPoint[0];
Paul Tuersley
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Thu Nov 15, 2007 5:01 am

I'm actually quite suprised that expression worked. It's ignoring the "temp =" bit which I'd expect to cause an error (temp is undefined), so you're expression is really:
thisComp.layer("arm_right").transform.position + thisComp.layer("backview").transform.anchorPoint[0];

So at the moment you're just adding arm_right position to backview anchor point. Couldn't you do what you're trying to do with parenting instead?

Who is online

Users browsing this forum: No registered users and 2 guests