how to make a gameObject rotate around another gameObject in Unity in the rotating plane
<p>I've two gameObjects, <code>sphereOne</code> and <code>sphereTwo</code> as the children of an empty gameObject <code>both</code>.</p>
<p>I've this C# code attached to a <code>sphereTwo</code></p>
<pre><code>private void Update() =&gt;
    transform.RotateAround(sphereOne.transform.position, 
        new Vector3(0, 1, 0), 100 * Time.deltaTime);
</code></pre>
<p>This lets <code>sphereTwo</code> rotate around <code>sphereOne</code>.</p>
<p>When I rotate the parent gameObject <code>both</code>, it rotates only on that specific plane.</p>
<p><a href="https://i.stack.imgur.com/mUrve.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mUrve.gif" alt="enter image description here" /></a></p>
<p>How do I dynamically update the transform position of the rotating sphere so that it lies on the same plane as the parent Object's rotation?</p>