1
0
Fork 0

GUI picks only traverse nodes with PICK_BIT set.

(Which is all nodes except those which explicitly opt out,
such as lights, skydome, for the moment)
This commit is contained in:
James Turner 2013-06-22 14:36:11 +01:00
parent 312be5410a
commit a94dce031c

View file

@ -1193,7 +1193,8 @@ static bool computeCameraIntersection(const CameraInfo* cinfo, const osg::Vec2d&
Vec3d(start.x(), start.y(), start.z()),
Vec3d(end.x(), end.y(), end.z()));
osgUtil::IntersectionVisitor iv(picker.get());
iv.setTraversalMask( ~simgear::MODELLIGHT_BIT );
iv.setTraversalMask( simgear::PICK_BIT );
const_cast<Camera*>(camera)->accept(iv);
if (picker->containsIntersections()) {
intersections = picker->getIntersections();