From 4dc6a6c4cd119fd3cea103c6c87b1c70a9519f6a Mon Sep 17 00:00:00 2001 From: Laurens Voerman Date: Fri, 7 Sep 2018 15:09:15 +0200 Subject: [PATCH] fix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set. --- src/osgText/TextBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgText/TextBase.cpp b/src/osgText/TextBase.cpp index d39531c87..4a2d887bb 100644 --- a/src/osgText/TextBase.cpp +++ b/src/osgText/TextBase.cpp @@ -513,7 +513,7 @@ bool TextBase::computeMatrix(osg::Matrix& matrix, osg::State* state) const height = static_cast(viewport->height()); } - osg::Matrix mvpw = rotate_matrix * modelview * projection * osg::Matrix::scale(width/2.0, height/2.0, 1.0); + osg::Matrix mvpw = rotate_matrix * osg::Matrix::translate(_position) * modelview * projection * osg::Matrix::scale(width/2.0, height/2.0, 1.0); osg::Vec3d origin = osg::Vec3d(0.0, 0.0, 0.0) * mvpw; osg::Vec3d left = osg::Vec3d(1.0, 0.0, 0.0) * mvpw - origin;