[osg-users] [forum] How to make isometric view

Jean-Yves Garneau jean-yves.garneau at criq.qc.ca
Fri Mar 16 06:11:54 PDT 2018

Thank you Robert for your answer.

Sometimes things seem to be very simple but when you are beginner, you miss details. It seem not to be enough to use the setViewMatrixAsLookAt() because I used setCameraManipulator(new osgGA::TrackballManipulator). I must used  this :


viewer->setCameraManipulator(new osgGA::TrackballManipulator);
viewer->getCamera()->setProjectionMatrixAsOrtho(-1.0f, 1.0f, -1.0, 1.0f, -1.0f, 1.0f);
osg::Vec3 eye(1.0, -1.0, 1.0);
osg::Vec3 center(0.0, 0.0, 0.0);
osg::Vec3 up(0.0, 0.0, 1.0);
viewer->getCameraManipulator()->setHomePosition(eye, center, up);

Now it's work well.

Thank you!

Jean-Yves Garneau

Read this topic online here:

More information about the osg-users mailing list