// 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 = GL::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;