From 65340f16677f7e7a1caf7cf2f99633825d113e5a Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Fri, 3 Jan 2014 14:33:54 -0800 Subject: [PATCH 1/2] Tweaked mirror distances --- interface/src/Application.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 08ffa436dc..d22426b16d 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -81,9 +81,9 @@ const int MIRROR_VIEW_TOP_PADDING = 5; const int MIRROR_VIEW_LEFT_PADDING = 10; const int MIRROR_VIEW_WIDTH = 265; const int MIRROR_VIEW_HEIGHT = 215; -const float MIRROR_FULLSCREEN_DISTANCE = 0.2f; -const float MIRROR_REARVIEW_DISTANCE = 0.3f; -const float MIRROR_REARVIEW_BODY_DISTANCE = 1.f; +const float MIRROR_FULLSCREEN_DISTANCE = 0.35f; +const float MIRROR_REARVIEW_DISTANCE = 0.65f; +const float MIRROR_REARVIEW_BODY_DISTANCE = 2.3f; void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString &message) { From 2286916fbb7b25f35ae2e920c5c3b417c7a49376 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Fri, 3 Jan 2014 15:00:42 -0800 Subject: [PATCH 2/2] =?UTF-8?q?Don=E2=80=99t=20render=20head=20if=20inside?= =?UTF-8?q?=20it!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- interface/src/avatar/MyAvatar.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index c668eb5956..0ef728adde 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -578,7 +578,13 @@ void MyAvatar::renderBody(bool forceRenderHead) { } else { // Render the body's voxels and head _skeletonModel.render(1.0f); - _head.render(1.0f, false); + + // Render head so long as the camera isn't inside it + const float RENDER_HEAD_CUTOFF_DISTANCE = 0.10f; + Camera* myCamera = Application::getInstance()->getCamera(); + if (forceRenderHead || (glm::length(myCamera->getPosition() - _head.calculateAverageEyePosition()) > RENDER_HEAD_CUTOFF_DISTANCE)) { + _head.render(1.0f, false); + } } _hand.render(true); }