mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use nlerp for interpolating rotations in animation
This commit is contained in:
parent
0a8642df0f
commit
ff4ae85262
@ -4178,8 +4178,7 @@ impl<S: Skeleton> FigureState<S> {
|
|||||||
/* let radius = vek::Extent3::<f32>::from(model.bounds.half_size()).reduce_partial_max();
|
/* let radius = vek::Extent3::<f32>::from(model.bounds.half_size()).reduce_partial_max();
|
||||||
let _bounds = BoundingSphere::new(pos.into_array(), scale * 0.8 * radius); */
|
let _bounds = BoundingSphere::new(pos.into_array(), scale * 0.8 * radius); */
|
||||||
|
|
||||||
// self.last_ori = vek::Lerp::lerp(self.last_ori, ori, 15.0 * dt);
|
self.last_ori = vek::Lerp::lerp(self.last_ori, ori, 15.0 * dt).normalized();
|
||||||
self.last_ori = anim::vek::Quaternion::slerp(self.last_ori, ori, 15.0 * dt);
|
|
||||||
|
|
||||||
self.state_time += (dt * state_animation_rate) as f64;
|
self.state_time += (dt * state_animation_rate) as f64;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user