osgEarth::IntersectionPicker issue with WGS-84 map type
I was making a tooltip handler and attaching it to my widget to handle hovering over scene objects. I interface through a QOpenGlWidget and that stuff is working just fine. However, I have both a projected spherical-mercator map and a WGS-84 map. The projected map works just fine since nothing can be "occluded" by the earth, however when I spin the globe around to the other side and hover my mouse on a coordinate that an infinite picker plane can intersect with, it will collide with stuff that is culled by the HorizonCullCallback that I've installed on just about every single node.
I have to allow the picker to have no limit because things can be overlapping. Here is my code for reference on what we attempted to do to circumvent the issue:
So what we tried to do was for the WGS-84 map type, we created a second picker and attempted to pick the nearest object, if it was the osgEarth::MapNode, return. Well... even when we rotated the earth around to show stuff and everything was visible, it still thinks with the osgEarth::IntersectionPicker::Limit::LIMIT_NEAREST flag that the begin() of the Intersections is still the osgEarth::MapNode. Is there a way that we don't allow the intersector to pick up things that are culled by the HorizonCullCallback? We have set a user value for stuff we've explicitly culled and that works just fine, but we're still having difficulty understanding what the LIMIT_NEAREST is doing... Thanks for any clarification or steering us in the right direction.
I'm also assuming that the begin() of any intersection will almost always be the chosen subgraph for the picker argument if it is found. Is there a way to reorder the intersections based on distance from the camera? That may help solve our issue. I just don't want there to be gross overhead for something that should be relatively light weight.