debugging tiny hulk problems

This commit is contained in:
amantley 2019-03-05 17:44:36 -08:00
parent 29d5574d93
commit 442da66583
2 changed files with 3 additions and 1 deletions

View file

@ -134,6 +134,7 @@ void AnimClip::copyFromNetworkAnim() {
const float animationUnitScale = extractScale(animModel.offset).y;
const float avatarHeightInMeters = avatarUnitScale * avatarHipsAbsoluteDefaultPose.trans().y;
const float animHeightInMeters = animationUnitScale * animHipsAbsoluteDefaultPose.trans().y;
qCDebug(animation) << "meters per unit, avatar: " << avatarUnitScale << " and height of avatar " << avatarHeightInMeters;
// get the parent scales for the avatar and the animation
float avatarHipsParentScale = 1.0f;
@ -154,7 +155,7 @@ void AnimClip::copyFromNetworkAnim() {
const float avatarToAnimationHeightRatio = avatarHeightInMeters / animHeightInMeters;
const float unitsRatio = 1.0f / (avatarUnitScale / animationUnitScale);
const float parentScaleRatio = 1.0f / (avatarHipsParentScale / animHipsParentScale);
qCDebug(animation) << "height ratio: " << avatarToAnimationHeightRatio << " units ratio " << unitsRatio << " parent Scale Ratio " << parentScaleRatio;
boneLengthScale = avatarToAnimationHeightRatio * unitsRatio * parentScaleRatio;
}

View file

@ -1983,6 +1983,7 @@ float Avatar::getUnscaledEyeHeight() const {
void Avatar::buildUnscaledEyeHeightCache() {
float skeletonHeight = getUnscaledEyeHeightFromSkeleton();
qCDebug(avatars_renderer) << "unscaled eye height " << skeletonHeight;
// Sanity check by looking at the model extents.
Extents meshExtents = _skeletonModel->getUnscaledMeshExtents();