From 8e81c4c46740726749190828a2017c26088e68f5 Mon Sep 17 00:00:00 2001 From: Jose Carlos Date: Thu, 6 Mar 2014 21:49:36 +0100 Subject: [PATCH] Changed the up vector for computing the scale factor: it failed when there was a roll in the view --- interface/src/avatar/Avatar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index ef6975d223..34721519ab 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -409,10 +409,10 @@ void Avatar::renderDisplayName() { glGetIntegerv(GL_VIEWPORT, viewportMatrix); GLdouble result0[3], result1[3]; - glm::dvec3 upVector(modelViewMatrix[1]); - + // The up vector must be relative to the rotation current rotation matrix: + // we set the identity glm::dvec3 testPoint0 = glm::dvec3(textPosition); - glm::dvec3 testPoint1 = glm::dvec3(textPosition) + upVector; + glm::dvec3 testPoint1 = glm::dvec3(textPosition) + glm::dvec3(IDENTITY_UP); bool success; success = gluProject(testPoint0.x, testPoint0.y, testPoint0.z,