From 803c41d636b17814fb2ff183cea0327b2d522d69 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Wed, 22 May 2013 15:28:24 -0700 Subject: [PATCH] Chat text floats above head, not torso. --- interface/src/Avatar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/Avatar.cpp b/interface/src/Avatar.cpp index c4d2ca8ec7..94a42c1ba9 100644 --- a/interface/src/Avatar.cpp +++ b/interface/src/Avatar.cpp @@ -58,7 +58,7 @@ float lightBlue [] = {0.7, 0.8, 1.0 }; bool usingBigSphereCollisionTest = true; float chatMessageScale = 0.0015; -float chatMessageHeight = 0.45; +float chatMessageHeight = 0.10; Avatar::Avatar(bool isMine) : _isMine(isMine), @@ -772,7 +772,8 @@ void Avatar::render(bool lookingInMirror, glm::vec3 cameraPosition) { float modelview[16]; glGetFloatv(GL_MODELVIEW_MATRIX, modelview); - glTranslatef(_position.x, _position.y + chatMessageHeight, _position.z); + //glTranslatef(_position.x, _position.y + chatMessageHeight, _position.z); + glTranslatef(_joint[AVATAR_JOINT_HEAD_BASE].springyPosition.x, _joint[AVATAR_JOINT_HEAD_BASE].springyPosition.y + chatMessageHeight, _joint[AVATAR_JOINT_HEAD_BASE].springyPosition.z); glRotatef(atan2(-modelview[2], -modelview[10]) * 180 / PI, 0, 1, 0); glColor3f(0, 0.8, 0);