title: How to nest a camera in a group in react three fiber
body: <p>I'm at a loss to do this in react-three-fiber. I want to create a rig for a camera (which is straightforward in three.js). I put the camera inside of a group. If I want to rotate the camera around the Y axis, i change the rotation of the parent group. If I want to rotate it around the X axis, I rotate the camera itself. This way, I don't deal with gimbal issues (like if y rotation is 180 degrees then x rotation is inverted).</p>
  <p>in three.js i would do:</p>
  <pre><code>const cameraRig = new THREE.Group();
  cameraRig.add(camera);
  scene.add(cameraRig);
  
  cameraRig.rotation.y = Math.PI;
  camera.rotation.x = Math.PI/8;
  </code></pre>
  <p>But in react-three-fiber I don't know.</p>
  <p>I have a camera I am using from useThree</p>
  <pre><code>const {camera} = useThree();
  
  ReactDOM.render(
    &lt;Canvas&gt;
      &lt;ambientLight /&gt;
      &lt;group rotation={[0,Math.PI,0]}&gt;
        &lt;camera rotation={[Math.PI/8,0,0]}/&gt;
      &lt;/group&gt;
    &lt;/Canvas&gt;,
    document.getElementById('root')
  );
  </code></pre>