Hi:
    I am a learner of OSG.Something puzzled me when I tried to set camera's
pitch,yaw,roll by osg::Quat.What I want to do is placing the camera at
(10.0f,10.0f,0.0f),then rotate 30 degrees by x axis.
    After I execute the following code,I found that the camera is not at
what I want to place to,and the camera's pitch is not correct too.I do not
know what is wrong.
    osg::Vec3 pos(10.0f,10.0f,0.0f);

    osg::Matrix matrix;

       matrix.setRotate(osg::Quat( osg::DegreesToRadians(30.0f),osg::X_AXIS,
       0.0f,osg::Z_AXIS,
       0.0f,osg::Y_AXIS));

       matrix.setTrans(pos);

     camera()->setViewMatrix(matrix);


Rgds

msyang
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to