I need to get the child's position in global value by using the parents rotation and the child x position. I've tried:
planet.transform.localPosition
This gives the position on the x axis but not where it is on the y.
x = planet.transform.position.x * x;
float y = Mathf.Sin(ring.transform.rotation.z);
y = planet.transform.position.x * y;
Vector2 position = new Vector3(x, y);
This doesn't get the proper position, it is off by quite a bit
transform.TransformPoint(planet.transform.position))
This did not work at all, it was off by far.
Then i tried instantiating an object and having it at 0,0,0 and have its rotation to the ring rotation and move transform.up to the planet position on the x.
Am i doing anything wrong here?
(The planets only use the X axis and rely on the parent "ring"'s rotation to change the position)
The diagram on the left shows that the parent rotation is 0, and the child position is 0,10,0. The right diagram shows the parent's rotation is 45, but the child's position is unknown. What would it be and how would you work it out?

