]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pose.cpp
Check for armature mismatches in Animation
[libs/gl.git] / source / pose.cpp
index 63346b08fb6944f33ded13f5c9c8f5c5731128f8..99fa6bb3dfe812265a8e2372ddd9c1daad5f887a 100644 (file)
@@ -37,7 +37,7 @@ void Pose::rotate_link(unsigned i, float angle, const Vector3 &axis)
        // Keep the base point stationary
        Vector3 base = arm_link.get_base();
        Vector3 new_base = links[i].local_matrix*base;
-       links[i].local_matrix = GL::Matrix::translation(base.x-new_base.x, base.y-new_base.y, base.z-new_base.z)*links[i].local_matrix;
+       links[i].local_matrix = Matrix::translation(base-new_base)*links[i].local_matrix;
 
        if(const Armature::Link *parent = arm_link.get_parent())
                links[i].matrix = links[parent->get_index()].matrix*links[i].local_matrix;