Fixed dt figure interpolation scaling

This commit is contained in:
Joshua Barretto 2019-06-26 11:08:28 +01:00
parent 5decd48db6
commit d2b8f592df

View File

@ -766,8 +766,8 @@ impl<S: Skeleton> FigureState<S> {
dt: f32,
) {
// Update interpolate pos
self.pos = Lerp::lerp(self.pos, pos, (0.4f32).powf(60.0).powf(dt));
self.ori = Slerp::slerp(self.ori, ori, (0.2f32).powf(60.0).powf(dt));
self.pos = Lerp::lerp(self.pos, pos, (0.4f32).powf(1.0 / 60.0).powf(1.0 / dt));
self.ori = Slerp::slerp(self.ori, ori, (0.2f32).powf(1.0 / 60.0).powf(1.0 / dt));
let mat = Mat4::<f32>::identity()
* Mat4::translation_3d(self.pos)