Hi, Ramy By default camera view matrix is identity. You should set view matrix on viewer camera to get what you want, or use camera manipulator. Also you can use viewer::run() instead of calling viewer::frame() in loop, this call (along with other things) adds camera manipulator and center view on scene.
Cheers 15.10.2011, 17:22, "ramy panda" <[email protected]>: > Hi, > > Now I have faced a problem is that when i import a model into my own > application, the model is not show at the center of the viewport, only after > interacted with the model using translate function i can see the model in the > view. I'm wondering that how to update the camera to make sure the model is > showed in the center of the viewport after i import the model into the scene. > Please be detail as i am a new user. Thanks very very very much. > > Thank you! > > Cheers, > ramy > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=43421#43421 > > _______________________________________________ > 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

