Added a factor to correct display name position for non default models

For the default avatar, the position is wrong
This commit is contained in:
Jose Carlos 2014-02-19 22:08:47 +01:00
parent a6b202ccbe
commit 4fd735e28f

View file

@ -302,7 +302,7 @@ void Avatar::renderDisplayName() {
glDisable(GL_LIGHTING);
glPushMatrix();
glm::vec3 textPosition = getPosition() + getBodyUpDirection() * (getSkeletonHeight() + getHeadHeight());
glm::vec3 textPosition = getPosition() + getBodyUpDirection() * ((getSkeletonHeight() + getHeadHeight()) / 1.5f);
glTranslatef(textPosition.x, textPosition.y, textPosition.z);
// we need "always facing camera": we must remove the camera rotation from the stack