slightly quicker alpha, improved anims

This commit is contained in:
jshipsey 2020-09-16 00:10:33 -04:00 committed by Sam
parent fe70b7fbce
commit b0d359e29f
3 changed files with 14 additions and 4 deletions

View File

@ -85,6 +85,10 @@ impl Animation for AlphaAnimation {
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.head.position = Vec3::new(0.0, skeleton_attr.head.0+0.0, skeleton_attr.head.1);
if let Some(stage_section) = stage_section {
match stage_section {
StageSection::Buildup => {
@ -100,7 +104,7 @@ impl Animation for AlphaAnimation {
},
StageSection::Swing => {
//println!("{:.3} swing", anim_time);
next.control.position = Vec3::new(-7.0, 3.0 + movement * 8.0, 3.0);
next.control.position = Vec3::new(-7.0, 3.0 + movement * 16.0, 3.0);
next.control.orientation =
Quaternion::rotation_x(-0.5 + movement * -1.0 * 0.0)
* Quaternion::rotation_y(-1.0 + movement * -0.6)
@ -121,15 +125,16 @@ impl Animation for AlphaAnimation {
},
StageSection::Recover => {
//println!("{:.3} recover", anim_time);
next.control.position = Vec3::new(-7.0, 7.0, 2.0);
next.control.orientation = Quaternion::rotation_x(0.0)
next.control.position = Vec3::new(-7.0, 15.0, 2.0);
next.control.orientation = Quaternion::rotation_x(-0.5)
* Quaternion::rotation_y(-1.57 + movement * 1.0)
* Quaternion::rotation_z(0.0);
next.control.scale = Vec3::one();
next.chest.orientation = Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(-1.57 + movement * 0.5);
next.head.orientation =
Quaternion::rotation_y(0.0) * Quaternion::rotation_z(1.57);
Quaternion::rotation_y(0.0) * Quaternion::rotation_z(1.57+movement*-0.5);
},
_ => {},
}

View File

@ -69,6 +69,8 @@ impl Animation for BetaAnimation {
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1);
if let Some(stage_section) = stage_section {
match stage_section {
StageSection::Buildup => {

View File

@ -55,6 +55,9 @@ impl Animation for SpinAnimation {
let test = (anim_time as f32 * 8.0).sin();
let test2 = (anim_time as f32 * 1.0).sin();
next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1);
if let Some(ToolKind::Sword(_)) = active_tool_kind {
next.l_hand.position = Vec3::new(-0.75, -1.0, 2.5);
next.l_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);