X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fanimation.cpp;h=c0b508180b0da9f8676cd12e6f5c74a4a77cede1;hb=2b779717e42b514210f7128cf9aee2276650e003;hp=255e63cc8102128299076d345cb99dd8904ca6ed;hpb=dd32f2502f8d090c639df4a34d56d21ccbecac83;p=libs%2Fgl.git diff --git a/source/animation.cpp b/source/animation.cpp index 255e63cc..c0b50818 100644 --- a/source/animation.cpp +++ b/source/animation.cpp @@ -223,10 +223,11 @@ Matrix Animation::Iterator::get_pose_matrix(unsigned link) const } // We must redo the base point correction since interpolation throws if off + // XXX This should probably be done on local matrices Matrix result = iter->pose_matrices[link].get(time_since_keyframe/iter->delta_t); const Vector3 &base = animation.armature->get_link(link).get_base(); Vector3 new_base = result*base; - result = Matrix::translation(base.x-new_base.x, base.y-new_base.y, base.z-new_base.z)*result; + result = Matrix::translation(base-new_base)*result; return result; }