Hi -- 'Picking' creates an osg::LineSegment that will intersect your scene... all the way through. So if you have (for example) a box shape, and you are picking one side, it's very possible (in fact, almost certain, unless you've done something special to prevent it) that the list of pick items will return the opposite side to you also; so you are correct Jeremy in saying that you can pick the same "object" twice.
I've created my own post-filter to clean-up the list of drawables and geodes so that I don't treat them twice. I hope this helps. Thanks -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy L. Moles Sent: Tuesday, June 12, 2007 10:59 AM To: osg users Subject: Re: [osg-users] Pick On Tue, 2007-06-12 at 16:52 +0200, [EMAIL PROTECTED] wrote: > Dear All > I implemented a Picking function... > In order to debug the picking function I simply print in monitor the id of the picked drawable. > > The problem is that the picking function is called two time for each mouse click. I don't think your picking function is getting called twice--I think you're seeing the same object twice in your pick results, which is something I'm running into myself. I just started learning picking this weekend, so I'm not 100% sure what's going on, but perhaps someone else will be able to chime in and help us both. I originally suspected this had something to do with having a 2D HUD Camera in my scene, but I don't think that's it. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
