]> git.mxchange.org Git - simgear.git/commitdiff
Fix pick callbacks on scenery.
authorJames Turner <zakalawe@mac.com>
Sat, 22 Jun 2013 10:59:42 +0000 (11:59 +0100)
committerJames Turner <zakalawe@mac.com>
Sat, 22 Jun 2013 10:59:42 +0000 (11:59 +0100)
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.

simgear/scene/model/SGPickAnimation.cxx

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