mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:57:13 +02:00
Merge branch 'master' of github.com:worklist/hifi into packet-versions
This commit is contained in:
commit
64887f2a36
1 changed files with 3 additions and 2 deletions
|
@ -2031,10 +2031,11 @@ void Application::updateAvatar(float deltaTime) {
|
||||||
_headMouseY = max(_headMouseY, 0);
|
_headMouseY = max(_headMouseY, 0);
|
||||||
_headMouseY = min(_headMouseY, _glWidget->height());
|
_headMouseY = min(_headMouseY, _glWidget->height());
|
||||||
|
|
||||||
// Set lookAtPosition if an avatar is at the center of the screen
|
const float MIDPOINT_OF_SCREEN = 0.5;
|
||||||
|
|
||||||
|
// Set lookAtPosition if an avatar is at the center of the screen
|
||||||
glm::vec3 screenCenterRayOrigin, screenCenterRayDirection;
|
glm::vec3 screenCenterRayOrigin, screenCenterRayDirection;
|
||||||
_viewFrustum.computePickRay(0.5, 0.5, screenCenterRayOrigin, screenCenterRayDirection);
|
_viewFrustum.computePickRay(MIDPOINT_OF_SCREEN, MIDPOINT_OF_SCREEN, screenCenterRayOrigin, screenCenterRayDirection);
|
||||||
|
|
||||||
glm::vec3 eyePosition;
|
glm::vec3 eyePosition;
|
||||||
if (isLookingAtOtherAvatar(screenCenterRayOrigin, screenCenterRayDirection, eyePosition)) {
|
if (isLookingAtOtherAvatar(screenCenterRayOrigin, screenCenterRayDirection, eyePosition)) {
|
||||||
|
|
Loading…
Reference in a new issue