tidying up code

Former-commit-id: df86599ae47b71bb744f5589da4511fa71603541
This commit is contained in:
jshipsey 2019-04-20 18:12:45 -04:00
parent 46f571f99a
commit 3d318a85e4
2 changed files with 1 additions and 5 deletions

View File

@ -26,11 +26,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) / 11.0;

View File

@ -26,12 +26,10 @@ 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 *1.0)/ 11.0;
//next.head.ori = Quaternion::rotation_z();
next.chest.offset = Vec3::unit_z() * (8.0 + fuzzwave * 0.8) / 11.0;
next.chest.ori = Quaternion::rotation_z(wave * 0.3);