mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-02 08:51:12 +02:00
tweaks to roll (back to no magnify) and lookAt indicator dot
This commit is contained in:
parent
e1a6a824a3
commit
e3ab16997a
2 changed files with 5 additions and 5 deletions
|
@ -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 this is the avatar being looked at, render a little ball above their head
|
||||||
if (_isLookAtTarget) {
|
if (_isLookAtTarget) {
|
||||||
const float LOOK_AT_INDICATOR_RADIUS = 0.05f;
|
const float LOOK_AT_INDICATOR_RADIUS = 0.03f;
|
||||||
const float LOOK_AT_INDICATOR_HEIGHT = 0.65f;
|
const float LOOK_AT_INDICATOR_HEIGHT = 0.60f;
|
||||||
const float LOOK_AT_INDICATOR_COLOR[] = { 0.2f, 0.2f, 0.2f, 0.3f };
|
const float LOOK_AT_INDICATOR_COLOR[] = { 0.8f, 0.0f, 0.0f, 0.5f };
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glColor4fv(LOOK_AT_INDICATOR_COLOR);
|
glColor4fv(LOOK_AT_INDICATOR_COLOR);
|
||||||
glTranslatef(_position.x, _position.y + (getSkeletonHeight() * LOOK_AT_INDICATOR_HEIGHT), _position.z);
|
glTranslatef(_position.x, _position.y + (getSkeletonHeight() * LOOK_AT_INDICATOR_HEIGHT), _position.z);
|
||||||
|
|
|
@ -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
|
// 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.
|
// 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.
|
// 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();
|
float magnifyFieldOfView = Menu::getInstance()->getFieldOfView() / Menu::getInstance()->getRealWorldFieldOfView();
|
||||||
|
|
||||||
Head* head = getHead();
|
Head* head = getHead();
|
||||||
head->setDeltaPitch(estimatedRotation.x * magnifyFieldOfView);
|
head->setDeltaPitch(estimatedRotation.x * magnifyFieldOfView);
|
||||||
head->setDeltaYaw(estimatedRotation.y * 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
|
// Update torso lean distance based on accelerometer data
|
||||||
const float TORSO_LENGTH = 0.5f;
|
const float TORSO_LENGTH = 0.5f;
|
||||||
|
|
Loading…
Reference in a new issue