Depending on what else is happening in your comp, this either works or it doesn’t…
A few prereqs:
1) The anchor point of the text layer is centered on the text layer and
2) the original position of the text is at the anchor point of the shape layer,
That being the original situation, the text layer position follows the rotation value of “Ellipse 1” in the shape layer with this:
xd = thisComp.layer("Shape Layer 1").content("Ellipse 1").transform.position[0];
yd = thisComp.layer("Shape Layer 1").content("Ellipse 1").transform.position[1];
xd *= xd;
yd *= yd;
d = Math.sqrt(xd+yd);
xpos = -d * Math.sin(degreesToRadians(thisComp.layer("Shape Layer 1").transform.rotation));
ypos = d * Math.cos(degreesToRadians(thisComp.layer("Shape Layer 1").transform.rotation));
value-[xpos, ypos]
So, essentially, were adding the position transformation of the rotating Ellipse 1 to the position of the text layer.
Kalleheikki Kannisto
Senior Graphic Designer