Permalink
Browse files

fix scale problem for osgText with characterSizeMode SCREEN_COORDS an…

…d _position set.
  • Loading branch information...
LaurensVoerman authored and robertosfield committed Sep 7, 2018
1 parent c481942 commit 583ecccd7573ef491f9c78b4543ccdb9889a3282
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/osgText/TextBase.cpp
View
@@ -513,7 +513,7 @@ bool TextBase::computeMatrix(osg::Matrix& matrix, osg::State* state) const
height = static_cast<value_type>(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;

0 comments on commit 583eccc

Please sign in to comment.