Fix pick callbacks on scenery.

Ensure pick callbacks work over the whole pick group, otherwise
the visible render group is hit first, and resolves to the ground
pick callback instead.

This fixes the hangar doors at KSFO and Moffett.
This commit is contained in:
James Turner 2013-06-22 11:59:42 +01:00
parent c6093430ae
commit 59cc200f92

View File

@ -407,7 +407,7 @@ SGPickAnimation::apply(osg::Group& group)
pickGroup->setStateSet(sharedHighlightStateSet()); pickGroup->setStateSet(sharedHighlightStateSet());
mainGroup->addChild(pickGroup); mainGroup->addChild(pickGroup);
setupCallbacks(SGSceneUserData::getOrCreateSceneUserData(pickGroup), mainGroup); setupCallbacks(SGSceneUserData::getOrCreateSceneUserData(mainGroup), mainGroup);
pickGroup->addChild(child); pickGroup->addChild(child);
group.removeChild(child); group.removeChild(child);