When creating an add-on for Bedrock Edition, custom geometries for mob variants (such as different versions of Zombies) can cause held items to attach incorrectly. Specifically, if a new geometry file is used for a variant and the bone path differs from the default ("waist>body>rightArm>rightItem" for the right hand), items no longer attach properly to the "rightItem" bone. Instead, they appear to float in the air.
Details:
I tested this with Zombie, Husk, Drowned, and Zombified Piglin, but the issue may extend to other mobs with variants.
The issue occurs only with custom geometries and only for items held in the right hand.
The problem does not arise when using default geometry or when modifying the bone path within the default geometry. Custom bones with altered pivot points in new geometries seem to trigger the bug.
Reproduction Steps:
Create a new geometry for any variant of a mob (e.g. Zombie) and reference it in the render controller.
Add a "rightItem" bone to the new geometry file, but use a custom bone path (e.g. if the default path is "root>body>rightArm>rightItem", change it to "waist>body>rightArm>rightItem" for baby).
Observe how the held item floats instead of attaching correctly to the right hand.
Expected Behavior:
Held items should attach to the "rightItem" bone regardless of whether the entity is using default or custom geometry, as long as the "rightItem" bone is present.
Attachments:
Image showing the issue.
Video showing the issue.
Sample resource pack demonstrating the bug by changing the bone path as said in the example of reproduction step 2.
Attachments
Comments 10
This appears to have been fixed at some point, as I cannot reproduce the bug. The baby zombies will hold any item correctly. Is this still an issue for you in the latest release? If so, then please attach a video on how to reproduce this.
This bug still occurs. I might have added the wrong pack so I replaced it with a problematic one. It seems that the baby held item also breaks if the bone path does not match the bone path of the default model.
Can confirm, relates to MCPE-188636. It does appear that the reason I wasn't able to reproduce this was due to the previously attached pack.
While adding the name dependent Copper Golem variant to my resource pack, I discovered that this bug is closely related to animations.
The item's position changes during geometry changes but freezes when the new geometry is active. I've attached a video demonstrating this.
I've found a small solution. You can have another render controller the points to the default geometry with an invisible texture, then have the second render controller for everything dependant. You can animate the first render controller however and it should have the item show up, animatable.
It is not an amazing solution by any means but it should work