Inconsistent GLTF bone transformations

There was a change from 4.x to 5.x where we changed how the skeletons are constructed in the glTF, but the usage of any of these bone functions is the root cause. These bone functions expect the mesh associated with the skeleton to be passed in. This is necessary because the skeleton maybe applied to multiple skinned meshes with different transforms. What used to happen in v4 is that the whole chain of node transforms was put into the skeleton and that’s why it was okay to not put the associated skinned mesh.

Here is how you could do it in 5.x: https://playground.babylonjs.com/#H925CH#37

This is a similar problem to this issue: Parenting a transform node to a bone

EDIT: another way you can do it (only for glTF) without needing to know which skinned mesh is to use the linked transform node: https://playground.babylonjs.com/#H925CH#38