This worked. But I also want to multiply the result by .81 to gear the rotation down on the layer being controlled. I haven't been able to figure out the right use of parenthesis or whatever to do this.
Re: Expression syntax help by Eric Goldstein on Aug 20, 2008 at 10:09:06 pm
Hi Lloyd or any other expression gurus out there,
I'm using this expression to move x and y positions based on
z rotation from another layer:
x =thisComp.layer("Rotating Lens Part").transform.zRotation;
[x+300.7, x+347.7, x]
The values added to x for x and y are offsets to place the layer in a particular position. I think I might be able to do this by adjusting the anchorpoint rather than doing this in the expression.
Anyway, I need to reverse the negative to positive rotation coming from the controling layer in the formula. How could I do this?
Thanks again,
Eric
Eric Goldstein
Giraffe Film Company
Los Angeles
eric@giraffefilm.com
Re: Expression syntax help by Eric Goldstein on Aug 20, 2008 at 10:37:22 pm
Hi Lloyd and others,
I figured out how to reverse the direction of the rotation using a negative sign. However, I now need to refer to a different comp. One of my expressions is:
I assume I replace the "thisComp" with the name of the comp I want to use. So far I haven't been able to get AE to take what I've tried.
Do I have to define the name of the Comp before referring to it? Or is there some syntax I'm not aware of? I tried using the name of the comp with and without parenthesis to replace "thisComp." This didn't work.
Any help would be great.
Thanks,
Eric
Eric Goldstein
Giraffe Film Company
Los Angeles
eric@giraffefilm.com
Re: Expression syntax help by Darby Edelen on Aug 21, 2008 at 5:51:42 pm
I recommend you post in the After Effects Expressions forum in the future, you'll probably find more help there with questions like these.
Also I recommend that you look into the linear() function as a potentially valuable resource to use in converting values instead of arbitrary multiplication. Sometimes your method is required, but usually the linear() function is much more elegant.
And since you've expressed an interest in expressions, check out this site: