mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:14:35 +02:00
Merge pull request #11440 from hyperlogic/bug-fix/text-entity-rendering
Fix for TextEntity rendering, the translation was incorrect
This commit is contained in:
commit
20cb02dabb
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ void TextEntityRenderer::doRender(RenderArgs* args) {
|
||||||
glm::quat orientation = glm::quat(glm::vec3(0.0f, yawRotation, 0.0f));
|
glm::quat orientation = glm::quat(glm::vec3(0.0f, yawRotation, 0.0f));
|
||||||
transformToTopLeft.setRotation(orientation);
|
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
|
transformToTopLeft.setScale(1.0f); // Use a scale of one so that the text is not deformed
|
||||||
|
|
||||||
batch.setModelTransform(transformToTopLeft);
|
batch.setModelTransform(transformToTopLeft);
|
||||||
|
|
Loading…
Reference in a new issue