Merge pull request #11440 from hyperlogic/bug-fix/text-entity-rendering

Fix for TextEntity rendering, the translation was incorrect
This commit is contained in:
Anthony Thibault 2017-09-22 11:19:24 -07:00 committed by GitHub
commit 20cb02dabb

View file

@ -102,7 +102,7 @@ void TextEntityRenderer::doRender(RenderArgs* args) {
glm::quat orientation = glm::quat(glm::vec3(0.0f, yawRotation, 0.0f));
transformToTopLeft.setRotation(orientation);
}
transformToTopLeft.postTranslate(glm::vec3(-0.5f, 0.5f, 0.0f)); // Go to the top left
transformToTopLeft.postTranslate(dimensions * glm::vec3(-0.5f, 0.5f, 0.0f)); // Go to the top left
transformToTopLeft.setScale(1.0f); // Use a scale of one so that the text is not deformed
batch.setModelTransform(transformToTopLeft);