lowered roll duration

This commit is contained in:
jshipsey 2019-06-16 11:54:02 -04:00 committed by timokoesters
parent 14ff033770
commit 8e019cdbec
No known key found for this signature in database
GPG Key ID: CD80BE9AAEE78097
2 changed files with 7 additions and 7 deletions

View File

@ -132,7 +132,7 @@ impl<'a> System<'a> for Sys {
// Roll
if let Some(time) = rollings.get_mut(entity).map(|r| &mut r.time) {
*time += dt.0;
if *time > 0.7 {
if *time > 0.55 {
rollings.remove(entity);
}
}

View File

@ -15,12 +15,12 @@ impl Animation for RollAnimation {
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let wave = (anim_time as f32 * 4.0).sin();
let wave_quick = (anim_time as f32 * 7.0).sin();
let wave_quick_cos = (anim_time as f32 * 7.0).cos();
let wave_cos = (anim_time as f32 * 4.0).cos();
let wave_slow = (anim_time as f32 * 2.0 + PI).sin();
let wave_dub = (anim_time as f32 * 4.0).sin();
let wave = (anim_time as f32 * 5.5).sin();
let wave_quick = (anim_time as f32 * 9.5).sin();
let wave_quick_cos = (anim_time as f32 * 9.5).cos();
let wave_cos = (anim_time as f32 * 5.5).cos();
let wave_slow = (anim_time as f32 * 2.8 + PI).sin();
let wave_dub = (anim_time as f32 * 5.5).sin();
next.head.offset = Vec3::new(0.0, 0.0 + wave_slow * -3.0, 9.0 + wave_dub * -5.0);
next.head.ori = Quaternion::rotation_x(wave_dub * -0.4);