[osg-users] Geometry in world coordinates but with same screen size - how to do?

Roko Talk schirokotal at gmail.com
Wed Jan 18 00:44:05 PST 2017


Hi guys,

I'm now trying desperately for hours now and not able to achieve the following. : (

I have a geometry, a 2D cross mark (everything is 2D), and I would like it to stick at specific world coordinates and in addition have always the same screen size, no matter what the zoom level is. I thought AutoTransform should do it, but somehow it doesn't the job : ( (And sadly osg::AutoTransform is more or less not documented at all what which feature does : (  )

This is what I have tried and I thought it should work:


Code:

osg::ref_ptr<osg::AutoTransform> auto_transform = new osg::AutoTransform();
auto_transform->addChild(cross_mark_geode);
auto_transform->setAutoScaleToScreen(true);
root->addChild(auto_transform);




Any idea how I could make it work?

Many many thanks in advance!

Cheers,
Roko

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69986#69986








More information about the osg-users mailing list