title: Qt3D rotate camera around mesh
body: <p>I've recently started learning Qt/QML/C++ and trying to build a very basic 3D scene to rotate the camera around a mesh object.</p>
  
  <p>I'm finding it very difficult to follow the examples and I'm finding the documentation doesn't provide any useful instructions. There doesn't seem to be many tutorials out there either, perhaps I'm looking in the wrong places.</p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;Qt3DQuickExtras/qt3dquickwindow.h&gt;
  #include &lt;Qt3DQuick/QQmlAspectEngine&gt;
  
  #include &lt;QGuiApplication&gt;
  #include &lt;QtQml&gt;
  
  int main(int argc, char **argv)
  {
      QGuiApplication app(argc, argv);
      Qt3DExtras::Quick::Qt3DQuickWindow view;
  
      // Expose the window as a context property so we can set the aspect ratio
      view.engine()-&gt;qmlEngine()-&gt;rootContext()-&gt;setContextProperty("_window", &amp;view);
      view.setSource(QUrl("qrc:/main.qml"));
      view.setWidth(800);
      view.setHeight(600);
      view.show();
  
      return app.exec();
  }
  </code></pre>
  
  <p>main.qml</p>
  
  <pre><code>import Qt3D.Core 2.0
  import Qt3D.Render 2.0
  import Qt3D.Input 2.0
  import Qt3D.Extras 2.0
  
  Entity {
      id: sceneRoot
  
      Camera {
          id: camera
          projectionType: CameraLens.PerspectiveProjection
          fieldOfView: 25
          aspectRatio: _window.width / _window.height
          nearPlane : 0.1
          farPlane : 1000.0
          position: Qt.vector3d( 0, 0.0, 20.0 )
          upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
          viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
      }
  
      OrbitCameraController {
          camera: camera
      }
  
      components: [
          RenderSettings {
              activeFrameGraph: ForwardRenderer {
                  clearColor: Qt.rgba(0, 0.5, 1, 1)
                  camera: camera
              }
          },
          InputSettings { }
      ]
  
      PhongMaterial {
          id: carMaterial
      }
  
      Mesh {
          id: carMesh
          source: "resources/aventador.obj"
      }
  
      Entity {
          id: carEntity
          components: [ carMesh, carMaterial ]
      }
  }
  </code></pre>
  
  <p>How do I get the camera to rotate around the mesh object?</p>