Hello,

I need to change the camera FOV, in an application with
osgViewer::Viewer, and the way that I have seen is this one:
osg::Camera *camera = viewer.getCameraWithFocus();
if (camera) {
        camera->setProjectionMatrix(osg::Matrix::perspective(fov, ratio, near,
far));
}

The problem is that this if condition isn't always true. In fact before
I move the mouse for the first time, the camera is NULL. My app doesn't
need the mouse, how can I solve this issue?

Thanks.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to