[osg-users] picking behaviour using osgViewer::View::computeIntersections

Swanger, Glen T. Glen.Swanger at jhuapl.edu
Fri May 6 13:46:40 PDT 2016

We are using the osgViewer::View::computeIntersections method to detect actionable elements in our scene as the mouse rolls over them in screen space so that we can highlight them for the user.  This works well in most cases, but for some geometry as you move the mouse over the same actionable element we may lose the intersection hit on that object; consequently, we remove the highlight from the object which leads to a confusing flashing effect for the user.  I ran our application in wireframe mode and saw that this problem occurs even if you move the mouse within the same triangle primitive.  I've made sure the window coordinates provided to the method are consistent with the mouse movement and I've logged the node paths for all the hits returned from this method to make sure I wasn't missing anything by looking at just the top most hit.  We compared our modeling techniques with geometry that doesn't result in this problem and nothing seems inconsistent.  Does anyone have an idea what might be causing this problem, or point us to something else we can look at.


More information about the osg-users mailing list