mojira.dev
MCPE-162780

Changing the arm position also affects attachable animations

Why this needs to be fixed:

If fixing MCPE-47877, the first-person positioning of attachables would get messed up. Again, because this also happened once in 1.17.0 when capes are enabled (MCPE-126660), causing major problems with the positioning animation of attachable items.

When changing the player's arm position in player_firstperson.animation.json, for some reason it also changes the positioning of attachable items, such as crossbows, tridents, bows, shields, and spyglasses.

To reproduce:

  1. Join a world, and see that the positioning of tridents, bows, etc are fine.

  2. Download the resource pack attached, that should fix MCPE-47877.

  3. Enable it and once again join the world

  4. Look at these items again, and notice how their position changed.

Expected results:

Their position remains the same.

Actual results:

Their position is changed, with no actual reason.

Code analysis

this comment.

There seems to be a 'rightitem' bone responsible for binding attachables in the animation.player.first_person.empty_hand (which controls the arm positioning in the player_firstperson.animation.json file). It is also a is a "child" of the 'rightarm' bone. It looks like changing the position of the arm also changes the position of the right item, messing up the positioning of the attachable items.

"animation.player.first_person.empty_hand": {
            "loop": true,
            "bones": {
                "rightarm": {
                    "position": [ 13.5, -10.0, 12.0 ],
                    "rotation": [ "95.0 + variable.is_using_vr * 7.5", "-45.0 + variable.is_using_vr * 7.5", "115.0 + variable.is_using_vr * -2.5" ]
                },
                "rightitem": {
                    "position": [ 0.0, "q.get_default_bone_pivot('rightarm',1) - q.get_default_bone_pivot('rightitem',1) - 7.0", "-q.get_default_bone_pivot('rightitem',2)" ]
                },
                "leftitem": {
                    "position": [ 0.0, "q.get_default_bone_pivot('leftarm',1) - q.get_default_bone_pivot('leftitem',1) - 7.0", "-q.get_default_bone_pivot('leftitem',2)" ]

Attachments

Comments 1

Sprunkles

The reason for this is the 'rightitem' bone responsible for binding attachables is a child of the 'rightarm' bone. Changing the position of the arm changes the position of the item in this manner.

migrated

(Unassigned)

913920

Confirmed

Multiple

1.19.80.20 Preview, 1.19.70.26 Preview, 1.19.70.21 Preview, 1.19.70.20 Preview, 1.19.60.27 Preview, ..., 1.19.50.24 Preview, 1.19.41, 1.19.50, 1.19.51, 1.19.63

Retrieved