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

Player model is offset when crouching

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.0.23 Preview, 1.19.81 Hotfix
    • None
    • Confirmed
    • Multiple
    • 1030075

      The sneaking animation used to be centered around the head and match Java Edition, but when the player's model and animations were made data driven, the sneaking animation was broken.

      Steps to Reproduce:

      1. Look up in third person front view or look down in third person back view;
      2. Crouch and observe the way your head shifts;
      3. Use characters of differing heights and compare.

      Observed Results:
      The head shifts forwards or backwards depending on the height of the character.

      Expected Results:
      The head remains centered.

      Screenshots/Videos attached: Yes

      Notes: There are other issues with the animation such as shorter characters slightly hovering over the ground instead of touching it, as well as some minor differences when compared to the original animation. Both of those are addressed in the suggested fix.

      This can be fixed by changing the animation from this...

      		"animation.player.sneaking" : {
      			"loop" : true,
      			"bones" : {
      				"body" : {
      					"position" : [ 0.0, -2.0, 0.0 ]
      				},
      				"head" : {
      					"position" : [ 0.0, -1.0, 0.0 ]
      				},
      				"leftarm" : {
      					"rotation" : [ -5.7, 0.0, 0.0 ]
      				},
      				"leftleg" : {
      					"rotation" : [ -28.0, 0.0, 0.0 ]
      				},
      				"rightarm" : {
      					"rotation" : [ -5.7, 0.0, 0.0 ]
      				},
      				"rightleg" : {
      					"rotation" : [ -28.0, 0.0, 0.0 ]
      				},
      				"root" : {
      					"position" : [ 0.0, 1.25, 9.0 ],
      					"rotation" : [ "28.0 - this", 0.0, 0.0 ]
      				}
      			}
      		}
      

      to this:

      		"animation.player.sneaking" : {
      			"loop" : true,
      			"bones" : {
      				"body" : {
      					"position" : [ 0.0, "(query.get_default_bone_pivot('body',1) - query.get_default_bone_pivot('rightleg',1)) * -0.12241 - 1.53108", 0.0 ],
      					"rotation" : [ 28.64788, 0.0, 0.0 ]
      				},
      				"head" : {
      					"position" : [ 0.0, -0.87758, -0.47942 ]
      				},
      				"leftarm" : {
      					"position" : [ 0.0, 0.24483, -0.95885 ],
      					"rotation" : [ -5.72957, 0.0, 0.0 ]
      				},
      				"leftleg" : {
      					"position" : [ 0.0, 0.0, "(query.get_default_bone_pivot('body',1) - query.get_default_bone_pivot('leftleg',1)) * 0.47942 - 1.75304" ]
      				},
      				"rightarm" : {
      					"position" : [ 0.0, 0.24483, -0.95885 ],
      					"rotation" : [ -5.72957, 0.0, 0.0 ]
      				},
      				"rightleg" : {
      					"position" : [ 0.0, 0.0, "(query.get_default_bone_pivot('body',1) - query.get_default_bone_pivot('rightleg',1)) * 0.47942 - 1.75304" ]
      				}
      			}
      		}
      

        1. Bugged.gif
          Bugged.gif
          74 kB
        2. Fixed.gif
          Fixed.gif
          73 kB

            LateLag [Mod] LateLag
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: