In Babylonejs, BoneIKController assumes that all bones are oriented along the x-axis, like the Dude example http://www.babylonjs-playground.com/#1EVNNB#15.
I find that "The bones should be oriented along the y-axis". Here is the demo of using BoneIKController with y-axis http://www.babylonjs-playground.com/#1EVNNB#46. To make it work correctly, you need to change
BABYLON.Matrix.RotationYawPitchRollToRef(0, 0, Math.PI * .5, mat2);
to
BABYLON.Matrix.RotationYawPitchRollToRef(0, 0, 0, mat2);
in babylon.boneIKController.ts file.
Of course, we can't expect that not all bones follow the same convention. So I wonder
Will it be solved by adding {adjustYaw, adjustPitch, adjustRoll} option like BoneLookController?
Is it possible to detect the bone orientation automatically?
Or we just add bone orientation parameter to BoneIKController.