title: THREE.js How to calculate rotation position on a 3D circle?
body: <p>As represented in the image below, I have a <code>THREE.Scene</code> with a simple cube. Attached to the cube is a <code>CANNON.Body</code> for Physics (represented in the green wireframe).</p>
  
  <p>The <code>CANNON.Body</code> is offset from the cube by a couple of units. For rotation, this offset will be the <strong>radius</strong>.</p>
  
  <p>When I rotate the cube, I want the <code>CANNON.Body</code> to rotate around the cube based on the <strong>angle</strong> and <strong>radius</strong>. On the right hand side of the image, I rotated the cube with an <strong>angle</strong> of 45 degrees (I also have radians available). However, the <code>CANNON.Body</code> does not rotate <em>around</em> the cube, only around it's own center. I need it to rotate <em>around</em> the cube for all axes <strong>x</strong>, <strong>y</strong> and <strong>z</strong>.</p>
  
  <p>Is there a built-in function in <code>THREE.js</code> or should I use my own mathematical equation for this? If so, what would that be?</p>
  
  <p><a href="https://i.stack.imgur.com/AQRii.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AQRii.png" alt="enter image description here"></a></p>
  
  <p>Thanks!</p>
  
  <p><em>P.S. I've seen solutions for pure <code>THREE.js</code> Scene's where the geometry is translated to manipulate the pivot point. Since I don't have geometry in my <code>CANNON.Body</code>, this will not be possible.</em></p>