Third Person View punching/mining animation is broken
Current animation:
- The body's rotation isn't pronounced enough, making the offhand move forward a bit too much;
- The main hand's rotation range is not wide enough, it doesn't ever get close to the center of the screen;
- The main hand is barely raised, regardless of the direction the player is looking at (MCPE-54697);
- The transition from the attack animation and the base pose is not smooth (MCPE-133777).
Original animation:
- The body rotates enough for the motion to be more lively without the offhand being too distracting;
- The main hand's movement is way more pronounced, starting wide and hitting the center of the screen before finishing;
- The main hand's motion is obvious, and also matches whichever direction the player is currently facing;
- The transition from the attack animation and the base pose is seamless.
Screenshots/Videos attached: Yes
Notes: This can be fixed by changing the animation from this...
{{code}}
"animation.player.attack.rotations" : {
"loop" : true,
"bones" : {
"body" : {
"rotation" : [ 0.0, "variable.attack_body_rot_y", 0.0 ]
},
"leftarm" : {
"rotation" : [ "-(math.sin((1 - math.pow((1 - variable.attack_time), 4)) * 180) * 1.2 + math.sin(variable.attack_time * 180)) * 10.0", 0.0, 0.0 ]
},
"rightarm" : {
"rotation" : [ "-(math.sin((1 - math.pow((1 - variable.attack_time), 4)) * 180) * 1.2 + math.sin(variable.attack_time * 180)) * 30.0", "-(math.sin((1 - math.pow((1 - variable.attack_time), 4)) * 180) ? (-90.0 * math.sin((1 - math.pow((1 - variable.attack_time), 4)) * 180)) + 30.0 : 0.0)", 0.0 ]
}
}
}
to this:
"animation.player.attack.rotations" : { "loop" : true, "bones" : { "body" : { "rotation" : [ 0.0, "math.sin(math.sqrt(variable.attack_time) * 360.0) * 11.46", 0.0 ] }, "leftarm" : { "rotation" : [ "math.sin(math.sqrt(variable.attack_time) * 360.0) * 11.46", 0.0, 0.0 ] }, "rightarm" : { "rotation" : [ "math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * 68.75 - math.sin(variable.attack_time * 180.0) * -(query.target_x_rotation - 40.10) * 0.75", "math.sin(math.sqrt(variable.attack_time) * 360.0) * 11.46 * 2.0", "math.sin(variable.attack_time * 180.0) * -22.91" ] } } }
The expression math.sin(math.sqrt(variable.attack_time) * 360.0) * 11.46 is repeated in all three limbs, and can be reduced to a variable. In this case, the variable variable.attack_body_rot_y found in player.entity.json should be changed from this...
Math.sin(360*Math.sqrt(variable.attack_time)) * 5.0
to this:
math.sin(math.sqrt(variable.attack_time) * 360.0) * 11.46
2019-07-01, 02:38 AM
2025-01-08, 12:41 AM
27
6
227517
-