From f6b5f3925acbdc18a43abf6c21673efa566aaf84 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Tue, 15 Sep 2015 16:43:52 -0700 Subject: [PATCH] Place head at requested position in all modes. (At least, until we can figure out how to get underpose position cleanly without tilt.) --- libraries/animation/src/Rig.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 076baf92c5..7e1d9a27e4 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -996,12 +996,9 @@ void Rig::updateNeckJoint(int index, const HeadParameters& params) { _animVars.set("headRotation", realLocalHeadOrientation); auto rootTrans = _animSkeleton->getAbsoluteBindPose(_rootJointIndex).trans; - - if (params.isInHMD) { - _animVars.set("headPosition", params.localHeadPosition + rootTrans); - } else { - _animVars.unset("headPosition"); - } + // There's a theory that when not in hmd, we should _animVars.unset("headPosition"). + // However, until that works well, let's always request head be positioned where requested by hmd, camera, or default. + _animVars.set("headPosition", params.localHeadPosition + rootTrans); } else if (!_enableAnimGraph) { auto& state = _jointStates[index];