tweaks to roll (back to no magnify) and lookAt indicator dot

This commit is contained in:
Philip Rosedale 2014-05-05 22:06:28 -07:00
parent e1a6a824a3
commit e3ab16997a
2 changed files with 5 additions and 5 deletions

View file

@ -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);

View file

@ -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;