I've been having problems loading GLTF files that load correctly using other graphics packages. I have GLTF files that contain multiple nodes and the nodes would end up rotated oddly.
Looking at the code, there is one place where, if the rotation is specified with a quaterion (rather than a matrix) the node rotation is computed with an odd RotationFromAxis computation. If I change the code to just fetch the quaterian from array, the GLTF file loads correctly.
The lines in question is 2195 in babylong.glTFFileLoader.js:
configureNode(lastNode, BABYLON.Vector3.FromArray(translation), BABYLON.Quaternion.RotationAxis(BABYLON.Vector3.FromArray(rotation).normalize(), rotation[3]), BABYLON.Vector3.FromArray(scale));
works if it is changed to:
configureNode(lastNode, BABYLON.Vector3.FromArray(translation),
BABYLON.Quaternion.FromArray(rotation),
BABYLON.Vector3.FromArray(scale));
Does one of the GLTF loader people know why the code is the way it is, and, is this a bug?
(Also, since I'm new here, should this be reported in the GitHub issues or is this the right place?)