[osg-users] Updating a PositionAttitudeTransform node from another PositionAttitudeTransform node

Dan johansson johansson_dan at hotmail.com
Wed Oct 9 06:41:57 PDT 2019


Thanks for the reply, i understand the issue. I'm not really understanding why this isn't built in automatically though. This simple code seemed to do the trick even with multiple Pat's chained


osg::NodePathList fullNodePath = node2->getParentalNodePaths();
osg::NodePath lastNodePath = fullNodePath.at(fullNodePath.size() - 1);

osg::Matrixd lastNodePositionMatrix = osg::computeLocalToWorld(lastNodePath);
osg::Vec3f lastNodePosition = lastNodePositionMatrix.getTrans();


Is there a good way to add a callback to this update that is _not_ on every render but rather when the specific Pat have been moved/rotated/scaled?

Regards Dan

Read this topic online here:

More information about the osg-users mailing list