3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-30 08:23:03 +02:00

Fixed warnings

This commit is contained in:
barnold1953 2014-07-01 10:28:40 -07:00
parent 1cd2066e79
commit 80bfb0766b
2 changed files with 4 additions and 7 deletions

View file

@ -583,8 +583,9 @@ void Application::paintGL() {
_myCamera.setTargetRotation(_myAvatar->getHead()->getCameraOrientation());
} else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) {
//Note, the camera distance is set in Camera::setMode() so we dont have to do it here.
_myCamera.setTightness(0.0f); // Camera is directly connected to head without smoothing
_myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition());
_myCamera.setTargetPosition(_myAvatar->getUprightHeadPosition());
_myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation());
} else if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {

View file

@ -288,8 +288,7 @@ void OculusManager::display(const glm::quat &bodyOrientation, const glm::vec3 &p
glPushMatrix();
glm::quat orientation;
glm::vec3 positionOffset;
//Render each eye into an fbo
for (int eyeIndex = 0; eyeIndex < ovrEye_Count; eyeIndex++) {
@ -301,10 +300,7 @@ void OculusManager::display(const glm::quat &bodyOrientation, const glm::vec3 &p
orientation.y = eyeRenderPose[eye].Orientation.y;
orientation.z = eyeRenderPose[eye].Orientation.z;
orientation.w = eyeRenderPose[eye].Orientation.w;
const float OCULUS_POSITION_SCALE = 0.2;
positionOffset = bodyOrientation * orientation * glm::vec3(eyeRenderPose[eye].Position.x, eyeRenderPose[eye].Position.y, eyeRenderPose[eye].Position.z) * OCULUS_POSITION_SCALE;
_camera->setTargetRotation(bodyOrientation * orientation);
_camera->setTargetPosition(position);
_camera->update(1.0f / Application::getInstance()->getFps());