From e3ab16997ae7b268f844a18428da572b5dba1664 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Mon, 5 May 2014 22:06:28 -0700 Subject: [PATCH] tweaks to roll (back to no magnify) and lookAt indicator dot --- interface/src/avatar/Avatar.cpp | 6 +++--- interface/src/avatar/MyAvatar.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index f45c97f66e..bad4083fcf 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -235,9 +235,9 @@ void Avatar::render(const glm::vec3& cameraPosition, RenderMode renderMode) { } // If this is the avatar being looked at, render a little ball above their head if (_isLookAtTarget) { - const float LOOK_AT_INDICATOR_RADIUS = 0.05f; - const float LOOK_AT_INDICATOR_HEIGHT = 0.65f; - const float LOOK_AT_INDICATOR_COLOR[] = { 0.2f, 0.2f, 0.2f, 0.3f }; + const float LOOK_AT_INDICATOR_RADIUS = 0.03f; + const float LOOK_AT_INDICATOR_HEIGHT = 0.60f; + const float LOOK_AT_INDICATOR_COLOR[] = { 0.8f, 0.0f, 0.0f, 0.5f }; glPushMatrix(); glColor4fv(LOOK_AT_INDICATOR_COLOR); glTranslatef(_position.x, _position.y + (getSkeletonHeight() * LOOK_AT_INDICATOR_HEIGHT), _position.z); diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index fb25da6973..a21cd3fc91 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -253,13 +253,13 @@ void MyAvatar::updateFromGyros(float deltaTime) { // avatar head is at the edge of the in-world view frustum. So while a real person may move // their head only 30 degrees or so, this may correspond to a 90 degree field of view. // Note that roll is magnified by a constant because it is not related to field of view. - const float AVATAR_HEAD_ROLL_MAGNIFY = 2.0f; + float magnifyFieldOfView = Menu::getInstance()->getFieldOfView() / Menu::getInstance()->getRealWorldFieldOfView(); Head* head = getHead(); head->setDeltaPitch(estimatedRotation.x * magnifyFieldOfView); head->setDeltaYaw(estimatedRotation.y * magnifyFieldOfView); - head->setDeltaRoll(estimatedRotation.z * AVATAR_HEAD_ROLL_MAGNIFY); + head->setDeltaRoll(estimatedRotation.z); // Update torso lean distance based on accelerometer data const float TORSO_LENGTH = 0.5f;