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 / 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-exception
I 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.
It looks like you're trying to control rotation from a position expression. If so, that won't work--the expression needs to be on the rotation property itself (an expression can only affect its host property, nothing else).