Bone and its transformNode's absolutePosition don't match

Hi, all !

I have a question about a bone and its transformNode.

In the Playground below, I used mixamo model (converted from fbx to glb by blender api).
You can pick a bone with left click and then gizmo will be attached to the transformNode of the bone.
With a certain bone selected, if you click the green ‘check console’ button, the bone’s absolute position and its transformNode’s absolute position will be logged in the console.

As far as I know, the absolute position of a bone and its transformNode should have the same value.
(And also as you can see, cause I attached a sphere to a bone and the gizmo to its transformNode, their absolute positions are same).

But If you check the console after clicking the green button, the result is always like below.
boneAbsolutePosition.x = transformNodeAbsolutePosition.x * (-1)

Is it a bug or a defect of my model file? Or is it expected?
And if it is not a bug, is there any way to make their absolute position same?

After so many trials and failures to match them, I leave this question here…
Thanks in advance

Adding @Evgeni_Popov to have a look.

You have a difference because when loading a glb file, we create a root node that transform the right handed coordinate system of the glb file to the left handed coordinate system of Babylon. Computing the absolute position from the transform node will have the transformation from this root aggregated to the final result, whereas computing the absolute position from the bone won’t.

If you set scene.useRightHandedSystem = true; just after scene creation, the transformation associated to the root node will be the identity, so you will get the same result:


Thank you sooooo much!! :slight_smile:

1 Like