mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
tidying up code
Former-commit-id: df86599ae47b71bb744f5589da4511fa71603541
This commit is contained in:
parent
46f571f99a
commit
3d318a85e4
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user