How apply the parent's transformations on an object without add it as child?

Greetings! I need an object “A” inherit transformation of another object “B” (and its ancestors). “A” should be child of scene, not of “B”. I try to apply the matrixWorld of “B” on “A” but it doesn’t look like a real child of “B”. You can realize the difference when there are multiple transformations (scale and rotation) in the different levels of hierarchy (from ancestors B).

B.updateMatrixWorld();
A.applyMatrix(B.matrixWorld);

I need something else?. Thx.

1 Like

Instead of doing B.updateMatrixWorld();, try it with B.updateWorldMatrix( true, false );. Notice the different method name.

Yes, i tried too.

I found the reason of the problem in these links:

How to apply parent transforms in the same order to child elements? - https://stackoverflow.com/questions/41022129/how-to-apply-parent-transforms-in-the-same-order-to-child-elements

THREE.Matrix4 compose/decompose incorrectly with non-uniform scale #15079 - https://github.com/mrdoob/three.js/issues/15079

Thanks for trying to help.