From 8f48515b80a95a026d427286e342e67cf56e8def Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 23 Apr 2008 12:28:45 +0000 Subject: [PATCH] Till BUSCH: this is a small (-1/+3) patch to fix pick animations on scenery objects. since picking apparently doesn't care for polygon offsets, the objects got into the picklist in the wrong way. now, no matter if the "highlight group" or the "normal group" gets hit first, the callback will fire. --- simgear/scene/model/animation.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index 1bb11bee..4d9c7731 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -2027,14 +2027,16 @@ SGPickAnimation::createAnimationGroup(osg::Group& parent) // Contains the normal geometry that is interactive osg::ref_ptr normalGroup = new osg::Group; + normalGroup->setName("pick normal group"); normalGroup->addChild(commonGroup); // Used to render the geometry with just yellow edges osg::Group* highlightGroup = new osg::Group; + highlightGroup->setName("pick highlight group"); highlightGroup->setNodeMask(SG_NODEMASK_PICK_BIT); highlightGroup->addChild(commonGroup); SGSceneUserData* ud; - ud = SGSceneUserData::getOrCreateSceneUserData(highlightGroup); + ud = SGSceneUserData::getOrCreateSceneUserData(commonGroup); std::vector actions; actions = getConfig()->getChildren("action"); for (unsigned int i = 0; i < actions.size(); ++i) -- 2.39.5