Interpolating Matrices
Posted
by
sebf
on Game Development
See other posts from Game Development
or by sebf
Published on 2011-02-18T16:44:41Z
Indexed on
2011/02/18
23:34 UTC
Read the original article
Hit count: 422
Hello,
Apologies if I am missing something very obvious (likely!) but is there anything wrong with interpolating between two matrices by:
float d = (float)(targetTime.Ticks - keyframe_start.ticks) / (float)(keyframe_end.ticks - keyframe_start.ticks);
return ((keyframe_start.Transform * (1 - d)) + (keyframe_end.Transform * d));
As in my app, when I try an use this to interpolate between two keyframes, the model begins to 'shrink' - the severity based on how far between the two keyframes the target time is; its worst when the transform split is ~50/50.
© Game Development or respective owner