BGE: Fix T46302: abort call for unnormalized quaterions.

This commit is contained in:
Porteries Tristan 2015-10-01 13:05:16 +02:00 committed by Sergey Sharybin
parent ea835c8a73
commit 2976a94c84
1 changed files with 4 additions and 0 deletions

View File

@ -176,6 +176,10 @@ static void game_blend_poses(bPose *dst, bPose *src, float srcweight, short mode
copy_qt_qt(dquat, dchan->quat);
copy_qt_qt(squat, schan->quat);
// Normalize quaternions so that interpolation/multiplication result is correct.
normalize_qt(dquat);
normalize_qt(squat);
if (mode==BL_Action::ACT_BLEND_BLEND)
interp_qt_qtqt(dchan->quat, dquat, squat, srcweight);
else {