Hi Sanat, It doesn't make sense to attach a CameraManipulator which updates the camera position and an update callback to update it's position, use one or the other.
Robert. On Tue, Jul 6, 2010 at 3:01 PM, Sanat Talmaki <[email protected]> wrote: > Hi Robert, > > Ah yes, my post's title may have been misleading. But what I am trying is: > For the top-most view, I add the whole scene to the view: > > > Code: > view->setSceneData(root); > view->setCameraManipulator(new osgGA::TrackballManipulator); > view->getCamera()->setUpdateCallback(new > CameraFollowMyNodeCallback(backhoe1PAT)); > > > > For the bottom left view, I wanted a view of the 3D model (backhoe) and the > terrain with the camera either inside the cab of the backhoe or hovering just > above it. So I did the following: > > > Code: > view->setSceneData(backhoe1PAT); > //where backhoe1PAT is the positionAtttransform of the 1st backhoe. > view->setCameraManipulator(new osgGA::TrackballManipulator); > view->getCamera()->setUpdateCallback(new > CameraFollowMyNodeCallback(backhoe1PAT)); > //follows backhoe1 in the overall scene view as in the topmost scene > > > > > However on running this code, as you can see the bottom-left view shows only > the backhoe and not resting on the underlying terrain. So I wanted to know > what I am doing wrong > > Thanks > > Sanat > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=29729#29729 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

