Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-47940

Third Person View punching/mining animation is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.70.24/25 Preview, 1.13.0.1 Beta, 1.14.0.3 Beta, 1.14.0.2 Beta, 1.13.0.17 Beta, 1.13.0.16 Beta, 1.13.0.15 Beta, 1.13.0.13 Beta, 1.13.0.9 Beta, 1.13.0.2 Beta, 1.16.40 Hotfix, 1.19.63
    • None
    • Confirmed
    • Windows
    • 227517

      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
      

            LateLag [Mod] LateLag
            Votes:
            26 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: