public static JointAnimationKeyFrame Lerp(JointAnimationKeyFrame frame1,
JointAnimationKeyFrame frame2, float amount)
{
// Lerp between components
Vector3 scale = Vector3.Lerp(frame1.Scale, frame2.Scale, amount);
Quaternion rotation = Quaternion.Lerp(frame1.Rotation, frame2.Rotation, amount);
Vector3 translation = Vector3.Lerp(frame1.Translation, frame2.Translation, amount);
// Lerp time
float time = frame1.Time + (frame2.Time - frame1.Time) * amount;
return new JointAnimationKeyFrame(time, scale, rotation, translation);
}