mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-18 03:36:22 +02:00
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:
parent
848bb4fccb
commit
f6b5f3925a
1 changed files with 3 additions and 6 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue