8719a81 breaks player-reanimating mods #15692
Labels
@ Client rendering
Discussion
Issues meant for discussion of one or more proposals
Not a bug
The behaviour is working as intended and won't be changed
Regression
Something that used to work no longer does
Milestone
8719a81 breaks playeranim and character_anim.
Both these mods "re-animate" the player (originally for the reason that 5.2 and lower did not support overriding single bones), that is, they calculate bone transforms in pure Lua for all bones and apply them via bone overrides.
The problem boils down to the fact that both these mods override the
Body
bone rotation to identity, when they should override it to a 180° rotation around the Y axis. It's easy to see that these mods are in the wrong by inspectingcharacter.b3d
and observing that this is what the body rotation should be (as a quaternion, that's 0, 1, 0, 0 in XYZW order).Problem is, older Luanti would falsely decompose a perfect 180° Y axis rotation (which is represented exactly this way in the b3d model!) into a -1, 1, -1 scaling and an identity rotation. In other words: These mods are working around an older Luanti bug. I now fixed this bug, and now these mods are setting wrong rotations for all bones that have such perfect rotations:
The bugs are relatively easy to pinpoint:
{x = 0, y = 180, z = 0}
(for body). Similar for other bones.Furthermore the manual head rotation needs to be fixed.
For a mod to be affected, it needs to apply a bone override to a bone which is rotated by exactly 180° around one of the cardinal axes, thereby inverting the other two axes. This means there will likely be more affected mods than these two.
Impact:
Affected servers
Possible solutions:
The text was updated successfully, but these errors were encountered: