Hi guys, I’m new to this forum.
Not sure if this is by design, or a bug, but when adding a Mesh/TransformNode with negative scale as child to another Mesh, its scaling gets flipped along different axis and rotation added along z axis.
Given: childMesh with scaling {x: -2, y: 1, z: 1}
and default rotation
when: parentMesh.addChild(childMesh)
and: parentMesh has default rotation and scaling
then: childMesh scaling and rotation should remain the same.
Expected: childMesh with scaling {x: -2, y: 1, z: 1}
Received: childMesh with scaling {x: 2 y: -1 z: 1}
and rotation {x: 0 y: 0 z: 3.141592653589793}
https://playground.babylonjs.com/#RH34UQ#8 (check console for warnings)
Visually, it transforms everything correctly, but in my use case, using React Redux with unidirectional data flow, I need all internal transform vectors to sync correctly, regardless if the Mesh is attached to a parent, or not.
The broken behavior happens even after releasing the childMesh.