Place head at requested position in all modes. (At least, until we can figure out how to get underpose position cleanly without tilt.)

This commit is contained in:
Howard Stearns 2015-09-15 16:43:52 -07:00
parent 848bb4fccb
commit f6b5f3925a

View file

@ -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];