Browse Source

Resolved issue #58

Christophe Riccio 12 years ago
parent
commit
8ed5f541ff
1 changed files with 3 additions and 2 deletions
  1. 3 2
      glm/gtx/matrix_interpolation.inl

+ 3 - 2
glm/gtx/matrix_interpolation.inl

@@ -117,11 +117,12 @@ namespace glm
 		T const delta
 	)
 	{
-		detail::tmat4x4<T> dltRotation = m2 * transpose(m1);
+		detail::tmat4x4<T> m1rot = extractMatrixRotation(m1);
+		detail::tmat4x4<T> dltRotation = m2 * transpose(m1rot);
 		detail::tvec3<T> dltAxis;
 		T dltAngle;
 		axisAngle(dltRotation, dltAxis, dltAngle);
-		detail::tmat4x4<T> out = axisAngleMatrix(dltAxis, dltAngle * delta) * extractMatrixRotation(m1);
+		detail::tmat4x4<T> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;
 		out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]);
 		out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]);
 		out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]);