mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Improvements to lantern holding when sitting
This commit is contained in:
parent
ed7cc12213
commit
2c95165c82
@ -264,7 +264,7 @@ impl Animation for RunAnimation {
|
|||||||
);
|
);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9);
|
next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9);
|
||||||
|
|
||||||
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
|
next.lantern.position = Vec3::new(0.0, 0.0, -2.5);
|
||||||
next.lantern.orientation = next.hand_r.orientation.inverse()
|
next.lantern.orientation = next.hand_r.orientation.inverse()
|
||||||
* Quaternion::rotation_x((foothorir + 0.5) * 1.0 * speednorm)
|
* Quaternion::rotation_x((foothorir + 0.5) * 1.0 * speednorm)
|
||||||
* Quaternion::rotation_y(tilt * 4.0 * foothorir + tilt * 3.0);
|
* Quaternion::rotation_y(tilt * 4.0 * foothorir + tilt * 3.0);
|
||||||
|
@ -90,8 +90,8 @@ impl Animation for SitAnimation {
|
|||||||
if skeleton.holding_lantern {
|
if skeleton.holding_lantern {
|
||||||
next.hand_r.position = Vec3::new(
|
next.hand_r.position = Vec3::new(
|
||||||
s_a.hand.0 - head_look.x * 10.0,
|
s_a.hand.0 - head_look.x * 10.0,
|
||||||
s_a.hand.1 + 5.0 - head_look.y * 8.0,
|
s_a.hand.1 + 5.0 + head_look.y * 12.0,
|
||||||
s_a.hand.2 + 11.0,
|
s_a.hand.2 + 9.0 - head_look.y * 12.0,
|
||||||
);
|
);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.25)
|
next.hand_r.orientation = Quaternion::rotation_x(2.25)
|
||||||
* Quaternion::rotation_z(0.9)
|
* Quaternion::rotation_z(0.9)
|
||||||
|
@ -149,7 +149,7 @@ impl Animation for StandAnimation {
|
|||||||
s_a.hand.1 + 5.0 - head_look.y * 8.0 + slow * 0.15 - impact * 0.2,
|
s_a.hand.1 + 5.0 - head_look.y * 8.0 + slow * 0.15 - impact * 0.2,
|
||||||
s_a.hand.2 + 11.0 + slow * 0.5 + impact * -0.1,
|
s_a.hand.2 + 11.0 + slow * 0.5 + impact * -0.1,
|
||||||
);
|
);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.25 + slow * -0.06 + impact * -0.1)
|
next.hand_r.orientation = Quaternion::rotation_x(2.5 + slow * -0.06 + impact * -0.1)
|
||||||
* Quaternion::rotation_z(0.9)
|
* Quaternion::rotation_z(0.9)
|
||||||
* Quaternion::rotation_y(head_look.x * 3.0)
|
* Quaternion::rotation_y(head_look.x * 3.0)
|
||||||
* Quaternion::rotation_x(head_look.y * 3.0);
|
* Quaternion::rotation_x(head_look.y * 3.0);
|
||||||
|
@ -320,17 +320,17 @@ impl Animation for WieldAnimation {
|
|||||||
};
|
};
|
||||||
match hands {
|
match hands {
|
||||||
(None, None) | (None, Some(Hands::One)) => {
|
(None, None) | (None, Some(Hands::One)) => {
|
||||||
//next.hand_l.position = Vec3::new(-4.5, 8.0, 5.0);
|
next.hand_l.position = Vec3::new(-8.0, 2.0, 1.0);
|
||||||
//next.hand_l.orientation = Quaternion::rotation_x(1.9) *
|
next.hand_l.orientation =
|
||||||
// Quaternion::rotation_y(-0.5)
|
Quaternion::rotation_x(0.5) * Quaternion::rotation_y(0.25);
|
||||||
},
|
},
|
||||||
(_, _) => {},
|
(_, _) => {},
|
||||||
};
|
};
|
||||||
match hands {
|
match hands {
|
||||||
(None, None) | (Some(Hands::One), None) => {
|
(None, None) | (Some(Hands::One), None) => {
|
||||||
//next.hand_r.position = Vec3::new(4.5, 8.0, 5.0);
|
next.hand_r.position = Vec3::new(8.0, 2.0, 1.0);
|
||||||
//next.hand_r.orientation = Quaternion::rotation_x(1.9) *
|
next.hand_r.orientation =
|
||||||
// Quaternion::rotation_y(0.5)
|
Quaternion::rotation_x(0.5) * Quaternion::rotation_y(-0.25);
|
||||||
},
|
},
|
||||||
(_, _) => {},
|
(_, _) => {},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user