tidying up code

Former-commit-id: 062930589922dc903be9e959eb06fd203945c101
This commit is contained in:
jshipsey 2019-04-20 18:12:45 -04:00
parent 30e80bdfc3
commit 83f8759746
2 changed files with 2 additions and 5 deletions

View File

@ -27,11 +27,9 @@ impl Animation for IdleAnimation {
let wave = (time as f32 * 12.0).sin();
let wavecos = (time as f32 * 12.0).cos();
let wave_slow = (time as f32 * 6.0 + PI).sin();
let wave_slower = (time as f32 * 2.0 + PI).sin();
let wavecos_slower = (time as f32 * 2.0 + PI).cos();
let wavecos_slow = (time as f32 * 6.0 + PI).cos();
let waveultra_slow = (time as f32 * 1.0 + PI).sin();
let waveultracos_slow = (time as f32 * 1.0 + PI).cos();
let wavecos_slow = (time as f32 * 6.0 + PI).cos();
let wave_dip = (wave_slow.abs() - 0.5).abs();
next.head.offset = Vec3::new(0.0, 0.0, 12.0 + waveultra_slow * 0.4) / SCALE;

View File

@ -27,12 +27,11 @@ impl Animation for RunAnimation {
let fuzzwave = (time as f32 * 12.0).sin();
let wavecos = (time as f32 * 14.0).cos();
let wave_slow = (time as f32 * 8.0 + PI).sin();
let waveultra_slow = (time as f32 * 0.5 + PI).sin();
let wavecos_slow = (time as f32 * 8.0 + PI).cos();
let wave_dip = (wave_slow.abs() - 0.5).abs();
next.head.offset = Vec3::unit_z() * (12.0 + fuzzwave *0.4)/ SCALE;
//next.head.ori = Quaternion::rotation_z();
next.chest.offset = Vec3::unit_z() * (8.0 + fuzzwave * 0.3) / SCALE;
next.chest.ori = Quaternion::rotation_z(wave * 0.2);