[Bf-blender-cvs] [2976a94] blender-v2.76-release: BGE: Fix T46302: abort call for unnormalized quaterions.
Porteries Tristan
noreply at git.blender.org
Fri Oct 9 13:32:17 CEST 2015
Commit: 2976a94c84fa9436f18faaea294d494b57b8221a
Author: Porteries Tristan
Date: Thu Oct 1 13:05:16 2015 +0200
Branches: blender-v2.76-release
https://developer.blender.org/rB2976a94c84fa9436f18faaea294d494b57b8221a
BGE: Fix T46302: abort call for unnormalized quaterions.
===================================================================
M source/gameengine/Converter/BL_ArmatureObject.cpp
===================================================================
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index 74ebdbc..3d863bf 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -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 {
More information about the Bf-blender-cvs
mailing list