[osg-users] IntersectVisitor does not recognize Nodes on different Projection

Robert Osfield robert.osfield at gmail.com
Tue Nov 24 09:42:54 PST 2009

Hi Thorsten,

Does the osgpick example work for you?  It does picking on both the
HUD and the 3D model.


On Tue, Nov 24, 2009 at 5:29 PM, Thorsten Werner <ThorstenWerner at gmx.net> wrote:
> Hi,
> I've got a loaded model which is a child of the root.
> the second child of the root node is a ortho2d projection, which i use for the GUI. Now i've taken the example osgkeyboardmouse from the osg site and my problem is that it only catches intersections with the loaded model. Not with the Goedes which are at the Ortho2D ProjectionMatrix.
> double w(.05), h(.05);
>        osgUtil::PolytopeIntersector* picker =
>                new osgUtil::PolytopeIntersector(
>                osgUtil::Intersector::PROJECTION,
>                x-w, y-h, x+w, y+h);
>        osgUtil::IntersectionVisitor iv(picker);
>        viewer->getCamera()->accept(iv);
> this is how i configured the Visitor. I've tried to change the Intersector into a osg::Intersector::WINDOW. ut then absolutely nothing happens anymore.
> Thanks in advance.
> Cheers,
> Thorsten
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=20283#20283
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list