I know this problem has been posted some times, but i can´t find a solution
right now i have a HUD which it´s made by rendering the subgraph of a camera
node.
these are the main lines to set the hud camera
hud_camera->setProjectionMatrix(osg::Matrix::ortho2D(0,1280,0,1024));
hud_camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
hud_camera->setViewMatrix(osg::Matrix::identity());
hud_camera->setClearMask(GL_DEPTH_BUFFER_BIT);
hud_camera->setRenderOrder(osg::Camera::POST_RENDER);
what does the parameters of the osg::Matrix::ortho2D represent???
i can pick always in one of the three objects, never in the second and
sometimes in the last one
i´ve tried to modify their Z values with no success
the picking is done using a osgUtil::PickVisitor whichg intersects against the
HUD camera subgraph
osgUtil::PickVisitor pick_visitor(hud_camera->getViewport(),
hud_camera->getProjectionMatrix(),
hud_camera->getViewMatrix(), (float)
mousex, (float) mousey);
pick_visitor.apply(*(hud_camera.get()));
where mousex and mousey represents the mouse coordinates
i´m using OSG 2.2 right now and we´re moving to 2.4 next month
any ideas???
_________________________________________________________________
Tecnología, moda, motor, viajes,…suscríbete a nuestros boletines para estar
siempre a la última
Guapos y guapas, clips musicales y estrenos de cine. _______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org