-
accessing sub-composition property
Hi, I have a wheel comp, within a layer “rim”
Now, the rim, nothing else, shall rotate to the x-position of the wheel.
So I tried to add the following script to the position-properties of the wheel-layer in wheel’s parent-composition.
720 is the circumference of the wheel in px.var r = (transform.position[0] / 720 * 360)/(180/Math.PI); // rad
thisComp.layer("wheel").layer("rim").transform.rotation = r; // I guess I can't stack layer-properties? but what then?
value + [0,0]; // If I dont do this, it causes a dimension-exceptionI haven’t figured out yet if the math is correct or if I need rotation or radiants. So far I just can’t get access to the rim-layer in the wheel-composition.
How can I do that?
Thank you, guys.