Fixed quaternion interpolation

Former-commit-id: b43671708fb9e64517a67ba070167587688457fb
This commit is contained in:
Lynix 2012-10-24 18:21:33 +02:00
parent 889a18b8be
commit 855b3676e8
1 changed files with 7 additions and 1 deletions

View File

@ -375,7 +375,13 @@ NzQuaternion<T> NzQuaternion<T>::Lerp(const NzQuaternion& from, const NzQuaterni
}
#endif
return from + interpolation*(to-from);
NzQuaternion interpolated;
interpolated.w = NzLerp(from.w, to.w, interpolation);
interpolated.x = NzLerp(from.x, to.x, interpolation);
interpolated.y = NzLerp(from.y, to.y, interpolation);
interpolated.z = NzLerp(from.z, to.z, interpolation);
return interpolated;
}
template<typename T>