mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Fix upright head model position calculation for avatar scale changes
This commit is contained in:
parent
a11bf7f15b
commit
f95e20153c
1 changed files with 4 additions and 0 deletions
|
@ -658,7 +658,11 @@ void SkeletonModel::buildShapes() {
|
|||
|
||||
int headJointIndex = _geometry->getFBXGeometry().headJointIndex;
|
||||
if (0 <= headJointIndex && headJointIndex < _jointStates.size()) {
|
||||
int rootJointIndex = _geometry->getFBXGeometry().rootJointIndex;
|
||||
glm::vec3 rootModelPosition;
|
||||
getJointPosition(headJointIndex, _defaultHeadModelPosition);
|
||||
getJointPosition(rootJointIndex, rootModelPosition);
|
||||
_defaultHeadModelPosition = _defaultHeadModelPosition - rootModelPosition;
|
||||
} else {
|
||||
_defaultHeadModelPosition = glm::vec3(0.f, 0.f, 0.f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue