[osg-users] Outlining a node (Beginner)
Lex Wilk
meg0neuni at gmail.com
Mon Jan 15 03:25:12 PST 2018
Hi,
I've had a look at my code and I've come up with this updated method of adding the outline, which works for a certain part of my robot, in this case the drawable of the UpperArm, however I'm still experiencing the same issue of flickering on and off when I try and use it.
Any help would be appreciated :D
Code:
findNodeVisitor upperArm("UpperArmRotator");
wholeModel->accept(upperArm);
osgFX::Outline* upperArmOutline = new osgFX::Outline();
upperArmOutline->setWidth(100); //in an attempt to see it better
upperArmOutline->setColor(osg::Vec4(1, 1, 0, 1));
osg::Node* upperArmDrawable = upperArm.getFirst()->asGroup()->getChild(1);
upperArmOutline->addChild(upperArmDrawable);
upperArm.getFirst()->asGroup()->replaceChild(upperArm.getFirst()->asGroup()->getChild(1), upperArmOutline);
Thank you!
Cheers,
Lex
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72757#72757
More information about the osg-users
mailing list