Bonjour Adrien,

I developped an icon with osg, which is an image, facing the camera whatever is 
placed the camera and has the same size on the screen whatever is the distance 
from the camera.

The problem is that the icon is sometimes blinking when I change the distance 
of the camera from the icon.

You can use osg::AutoTransform to do this for you instead of changing the behavior of a MatrixTransform. Just use setAutoScaleToScreen(true). Or check how AutoTransform works by looking at its source code.

Note that if you use AutoTransform, below your AutoTransform you'll probably need a MatrixTransform to scale your quad to the right size (in pixels) because everything that's under the AutoTransform is in screen coordinates.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to