mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed vanishing legs
This commit is contained in:
parent
6dc5a5b366
commit
510b5eaf98
@ -191,12 +191,14 @@ impl Animation for RunAnimation {
|
|||||||
+ (1.0 - sideabs) * (1.25 * speednorm + ((footvertl * -5.0 * speednorm).max(-1.0)))
|
+ (1.0 - sideabs) * (1.25 * speednorm + ((footvertl * -5.0 * speednorm).max(-1.0)))
|
||||||
+ side * ((footvertsl * 1.5).max(-1.0)),
|
+ side * ((footvertsl * 1.5).max(-1.0)),
|
||||||
);
|
);
|
||||||
next.foot_l.orientation =
|
next.foot_l.orientation = Quaternion::rotation_x(
|
||||||
Quaternion::rotation_x(
|
(1.0 - sideabs) * (foothoril + 0.4 * (1.0 - sideabs)) * -1.5 * speednorm
|
||||||
(1.0 - sideabs) * (foothoril + 0.4 * (1.0 - sideabs)) * -1.5 * speednorm
|
+ sideabs * -0.5,
|
||||||
+ sideabs * -0.5,
|
) * Quaternion::rotation_y(
|
||||||
) * Quaternion::rotation_y(tilt * -0.5 + side * 0.3 + side * (foothoril * 0.3))
|
tilt * -0.5 + side * 0.3 + side * (foothoril * 0.3),
|
||||||
* Quaternion::rotation_z(side * 0.9 * orientation.xy().dot(velocity.xy() / speed));
|
) * Quaternion::rotation_z(
|
||||||
|
side * 0.9 * orientation.xy().dot(velocity.xy() / (speed + 0.01)),
|
||||||
|
);
|
||||||
|
|
||||||
next.foot_r.position = Vec3::new(
|
next.foot_r.position = Vec3::new(
|
||||||
s_a.foot.0 + footstrafer * sideabs * 7.0 + tilt * -10.0,
|
s_a.foot.0 + footstrafer * sideabs * 7.0 + tilt * -10.0,
|
||||||
@ -205,12 +207,14 @@ impl Animation for RunAnimation {
|
|||||||
+ (1.0 - sideabs) * (1.25 * speednorm + ((footvertr * -5.0 * speednorm).max(-1.0)))
|
+ (1.0 - sideabs) * (1.25 * speednorm + ((footvertr * -5.0 * speednorm).max(-1.0)))
|
||||||
+ side * ((footvertsr * -1.5).max(-1.0)),
|
+ side * ((footvertsr * -1.5).max(-1.0)),
|
||||||
);
|
);
|
||||||
next.foot_r.orientation =
|
next.foot_r.orientation = Quaternion::rotation_x(
|
||||||
Quaternion::rotation_x(
|
(1.0 - sideabs) * (foothorir + 0.4 * (1.0 - sideabs)) * -1.5 * speednorm
|
||||||
(1.0 - sideabs) * (foothorir + 0.4 * (1.0 - sideabs)) * -1.5 * speednorm
|
+ sideabs * -0.5,
|
||||||
+ sideabs * -0.5,
|
) * Quaternion::rotation_y(
|
||||||
) * Quaternion::rotation_y(tilt * -0.5 + side * 0.3 + side * (foothorir * 0.3))
|
tilt * -0.5 + side * 0.3 + side * (foothorir * 0.3),
|
||||||
* Quaternion::rotation_z(side * 0.9 * orientation.xy().dot(velocity.xy() / speed));
|
) * Quaternion::rotation_z(
|
||||||
|
side * 0.9 * orientation.xy().dot(velocity.xy() / (speed + 0.01)),
|
||||||
|
);
|
||||||
//
|
//
|
||||||
|
|
||||||
next.shoulder_l.position = Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
next.shoulder_l.position = Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||||
|
Loading…
Reference in New Issue
Block a user