mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:37:31 +02:00
commit
fdb1bf5622
3 changed files with 8 additions and 8 deletions
|
@ -59,8 +59,8 @@ const float HEAD_RATE_MAX = 50.f;
|
||||||
const float SKIN_COLOR[] = {1.0, 0.84, 0.66};
|
const float SKIN_COLOR[] = {1.0, 0.84, 0.66};
|
||||||
const float DARK_SKIN_COLOR[] = {0.9, 0.78, 0.63};
|
const float DARK_SKIN_COLOR[] = {0.9, 0.78, 0.63};
|
||||||
const int NUM_BODY_CONE_SIDES = 9;
|
const int NUM_BODY_CONE_SIDES = 9;
|
||||||
const float chatMessageScale = 0.0015;
|
const float CHAT_MESSAGE_SCALE = 0.0015;
|
||||||
const float chatMessageHeight = 0.4f;
|
const float CHAT_MESSAGE_HEIGHT = 0.1f;
|
||||||
|
|
||||||
void Avatar::sendAvatarURLsMessage(const QUrl& voxelURL) {
|
void Avatar::sendAvatarURLsMessage(const QUrl& voxelURL) {
|
||||||
QByteArray message;
|
QByteArray message;
|
||||||
|
@ -303,7 +303,7 @@ void Avatar::render(bool forceRenderHead) {
|
||||||
}
|
}
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
glm::vec3 chatPosition = getPosition() + getBodyUpDirection() * chatMessageHeight * _scale;
|
glm::vec3 chatPosition = getHead().getEyePosition() + getBodyUpDirection() * CHAT_MESSAGE_HEIGHT * _scale;
|
||||||
glTranslatef(chatPosition.x, chatPosition.y, chatPosition.z);
|
glTranslatef(chatPosition.x, chatPosition.y, chatPosition.z);
|
||||||
glm::quat chatRotation = Application::getInstance()->getCamera()->getRotation();
|
glm::quat chatRotation = Application::getInstance()->getCamera()->getRotation();
|
||||||
glm::vec3 chatAxis = glm::axis(chatRotation);
|
glm::vec3 chatAxis = glm::axis(chatRotation);
|
||||||
|
@ -313,7 +313,7 @@ void Avatar::render(bool forceRenderHead) {
|
||||||
glColor3f(0, 0.8, 0);
|
glColor3f(0, 0.8, 0);
|
||||||
glRotatef(180, 0, 1, 0);
|
glRotatef(180, 0, 1, 0);
|
||||||
glRotatef(180, 0, 0, 1);
|
glRotatef(180, 0, 0, 1);
|
||||||
glScalef(_scale * chatMessageScale, _scale * chatMessageScale, 1.0f);
|
glScalef(_scale * CHAT_MESSAGE_SCALE, _scale * CHAT_MESSAGE_SCALE, 1.0f);
|
||||||
|
|
||||||
glDisable(GL_LIGHTING);
|
glDisable(GL_LIGHTING);
|
||||||
glDepthMask(false);
|
glDepthMask(false);
|
||||||
|
|
|
@ -58,8 +58,8 @@ const float BODY_BALL_RADIUS_RIGHT_TOES = 0.025;
|
||||||
|
|
||||||
extern const bool usingBigSphereCollisionTest;
|
extern const bool usingBigSphereCollisionTest;
|
||||||
|
|
||||||
extern const float chatMessageScale;
|
extern const float CHAT_MESSAGE_SCALE;
|
||||||
extern const float chatMessageHeight;
|
extern const float CHAT_MESSAGE_HEIGHT;
|
||||||
|
|
||||||
enum AvatarBodyBallID {
|
enum AvatarBodyBallID {
|
||||||
BODY_BALL_NULL = -1,
|
BODY_BALL_NULL = -1,
|
||||||
|
|
|
@ -474,7 +474,7 @@ void MyAvatar::render(bool forceRenderHead) {
|
||||||
}
|
}
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
glm::vec3 chatPosition = getPosition() + getBodyUpDirection() * chatMessageHeight * _scale;
|
glm::vec3 chatPosition = getHead().getEyePosition() + getBodyUpDirection() * CHAT_MESSAGE_HEIGHT * _scale;
|
||||||
glTranslatef(chatPosition.x, chatPosition.y, chatPosition.z);
|
glTranslatef(chatPosition.x, chatPosition.y, chatPosition.z);
|
||||||
glm::quat chatRotation = Application::getInstance()->getCamera()->getRotation();
|
glm::quat chatRotation = Application::getInstance()->getCamera()->getRotation();
|
||||||
glm::vec3 chatAxis = glm::axis(chatRotation);
|
glm::vec3 chatAxis = glm::axis(chatRotation);
|
||||||
|
@ -484,7 +484,7 @@ void MyAvatar::render(bool forceRenderHead) {
|
||||||
glColor3f(0, 0.8, 0);
|
glColor3f(0, 0.8, 0);
|
||||||
glRotatef(180, 0, 1, 0);
|
glRotatef(180, 0, 1, 0);
|
||||||
glRotatef(180, 0, 0, 1);
|
glRotatef(180, 0, 0, 1);
|
||||||
glScalef(_scale * chatMessageScale, _scale * chatMessageScale, 1.0f);
|
glScalef(_scale * CHAT_MESSAGE_SCALE, _scale * CHAT_MESSAGE_SCALE, 1.0f);
|
||||||
|
|
||||||
glDisable(GL_LIGHTING);
|
glDisable(GL_LIGHTING);
|
||||||
glDepthMask(false);
|
glDepthMask(false);
|
||||||
|
|
Loading…
Reference in a new issue