title: OpenSceneGraph set the camera at an initial position
body: <p>I am working on OpenSceneGraph for the first time and I'm a bit lost cause the documentation is really not that clear...</p>
  
  <p>So, I have this code that load a obj file with a house on it, and I have drown a little box where I want the "person" to be. So now, instead of having that box there, I would like to have the camera there, looking at the front and later on I'll to something to move the terrain around the fixed camera so that it looks like the camera is moving but the terrain is moving.</p>
  
  <p>So, here is my code:</p>
  
  <pre><code>int main()
  {
      osgViewer::Viewer viewer;
  
      viewer.setUpViewInWindow(0,0,800,800);
  
      osg::ref_ptr&lt;osg::Group&gt; root (new osg::Group);
  
      osg::Node* terrain = osgDB::readNodeFile(".terrain.obj");
      if(terrain == NULL) {
          return -1;
      }
  
      Geode* gbox = new Geode();
      gbox-&gt;addDrawable(new ShapeDrawable(new Box()));
  
      PositionAttitudeTransform* terrainT = new PositionAttitudeTransform();
  
      PositionAttitudeTransform* boxT = new PositionAttitudeTransform();
      boxT-&gt;setScale(Vec3d(50,50,50));
      boxT-&gt;setPosition(Vec3d(1000,1000,0)); 
  
      root-&gt;addChild(terrainT);
      root-&gt;addChild(boxT);
      terrainT-&gt;addChild(terrain);
      boxT-&gt;addChild(gbox);
  
      viewer.setSceneData( root.get() ); 
      viewer.addEventHandler(new osgViewer::WindowSizeHandler);
      viewer.setCameraManipulator(new osgGA::TrackballManipulator());
  
      viewer.realize();
      while(!viewer.done()) {
          viewer.frame(); 
      }
  
      return 0;
  }
  </code></pre>
  
  <p>So this code works, it loads the the fiel correctly, puts the box where I want and I can navigate with the mouse.</p>
  
  <p>Now, I just really cannot find anything to place the camera where the box is. I just can't. </p>
  
  <p>Can anyone give me a hint of how to do it? It shouldn't be very hard, but I cannot find any good tutorial and the documentation the Viewer and Camera classes is really not very helpful.</p>