Oh, of course. Ignore my last email. Apparently, Rabbi and I both read right over that. :-(


Mourad Boufarguine wrote:
Hi Rabbi,

rather, it should be :

camera->setProjectionMatrixAsPerspective(45.0, 1.0, 0.5, 1000);
camera->setViewMatrix(osg::Matrix::lookAt(Vec3(0, 0, 200), Vec3(0, 0, 0), Vec3(0, 1, 0)));

It is the view matrix that controls the position and orientaion of the camera.

Mourad

On Wed, Jan 13, 2010 at 5:49 PM, Rabbi Robinson <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I need to position my camera at certain location and look at
    another. Can someone tell me how to do that?

    I have the following code the it does not do what it's supposed to do

    camera->setProjectionMatrixAsPerspective(45.0, 1.0, 0.5, 1000);
    camera->setProjectionMatrix(osg::Matrix::lookAt(Vec3(0, 0, 200),
    Vec3(0, 0, 0), Vec3(0, 1, 0)));

    Thank you!

    Cheers,
    Rabbi

    ------------------
    Read this topic online here:
    http://forum.openscenegraph.org/viewtopic.php?p=22562#22562





    _______________________________________________
    osg-users mailing list
    [email protected]
    <mailto:[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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to