mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
adjusted v-tilt, roll speed, run animation tempo
This commit is contained in:
parent
e066d98762
commit
0c534efddd
@ -15,8 +15,8 @@ const HUMANOID_SPEED: f32 = 120.0;
|
||||
const HUMANOID_AIR_ACCEL: f32 = 10.0;
|
||||
const HUMANOID_AIR_SPEED: f32 = 100.0;
|
||||
const HUMANOID_JUMP_ACCEL: f32 = 16.0;
|
||||
const ROLL_ACCEL: f32 = 140.0;
|
||||
const ROLL_SPEED: f32 = 450.0;
|
||||
const ROLL_ACCEL: f32 = 160.0;
|
||||
const ROLL_SPEED: f32 = 550.0;
|
||||
const GLIDE_ACCEL: f32 = 15.0;
|
||||
const GLIDE_SPEED: f32 = 45.0;
|
||||
// Gravity is 9.81 * 4, so this makes gravity equal to .15
|
||||
|
@ -16,11 +16,11 @@ impl Animation for RunAnimation {
|
||||
) -> Self::Skeleton {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
let wave = (anim_time as f32 * 14.0).sin();
|
||||
let wave_cos = (anim_time as f32 * 14.0).cos();
|
||||
let wave_diff = (anim_time as f32 * 14.0 + PI / 2.0).sin();
|
||||
let wave_cos_dub = (anim_time as f32 * 28.0).cos();
|
||||
let wave_stop = (anim_time as f32 * 3.0).min(PI / 2.0).sin();
|
||||
let wave = (anim_time as f32 * 12.0).sin();
|
||||
let wave_cos = (anim_time as f32 * 12.0).cos();
|
||||
let wave_diff = (anim_time as f32 * 12.0 + PI / 2.0).sin();
|
||||
let wave_cos_dub = (anim_time as f32 * 24.0).cos();
|
||||
let wave_stop = (anim_time as f32 * 2.6).min(PI / 2.0).sin();
|
||||
|
||||
let head_look = Vec2::new(
|
||||
((global_time + anim_time) as f32 / 2.0)
|
||||
@ -54,7 +54,7 @@ impl Animation for RunAnimation {
|
||||
|
||||
next.l_hand.offset = Vec3::new(
|
||||
-8.5 + wave_cos_dub * 0.8,
|
||||
2.0 + wave_cos * 6.0,
|
||||
2.0 + wave_cos * 5.0,
|
||||
7.0 - wave * 1.0,
|
||||
);
|
||||
next.l_hand.ori = Quaternion::rotation_x(wave_cos * 0.8);
|
||||
@ -62,18 +62,18 @@ impl Animation for RunAnimation {
|
||||
|
||||
next.r_hand.offset = Vec3::new(
|
||||
8.5 - wave_cos_dub * 0.8,
|
||||
2.0 - wave_cos * 6.0,
|
||||
2.0 - wave_cos * 5.0,
|
||||
7.0 + wave * 1.0,
|
||||
);
|
||||
next.r_hand.ori = Quaternion::rotation_x(wave_cos * -0.8);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
|
||||
next.l_foot.offset = Vec3::new(-3.4, 0.0 + wave_cos * 1.0, 6.0);
|
||||
next.l_foot.ori = Quaternion::rotation_x(-0.0 - wave_cos * 1.5);
|
||||
next.l_foot.offset = Vec3::new(-3.4, 0.0 + wave_cos * 1.0, 7.0);
|
||||
next.l_foot.ori = Quaternion::rotation_x(-0.0 - wave_cos * 1.3);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
|
||||
next.r_foot.offset = Vec3::new(3.4, 0.0 - wave_cos * 1.0, 6.0);
|
||||
next.r_foot.ori = Quaternion::rotation_x(-0.0 + wave_cos * 1.5);
|
||||
next.r_foot.offset = Vec3::new(3.4, 0.0 - wave_cos * 1.0, 7.0);
|
||||
next.r_foot.ori = Quaternion::rotation_x(-0.0 + wave_cos * 1.3);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
|
||||
next.weapon.offset = Vec3::new(-7.0, -5.0, 15.0);
|
||||
@ -103,7 +103,7 @@ impl Animation for RunAnimation {
|
||||
|
||||
next.torso.offset = Vec3::new(0.0, -0.2, 0.4);
|
||||
next.torso.ori =
|
||||
Quaternion::rotation_x(wave_stop * velocity * -0.04 + wave_diff * velocity * -0.005);
|
||||
Quaternion::rotation_x(wave_stop * velocity * -0.06 + wave_diff * velocity * -0.005);
|
||||
next.torso.scale = Vec3::one() / 11.0;
|
||||
|
||||
next
|
||||
|
Loading…
Reference in New Issue
Block a user