Description
In the attached qml, the green cube copies sceneRotation from the red cube,
and the parent of the red cube is rotated 180 degrees around the x axis.
Node { id: sourceParentNode scale: scaleButtonGroup.checkedButton.scale eulerRotation.x: 180 Model { id: sourceModel scale: Qt.vector3d(0.1, 1, 0.1) eulerRotation.z: 30 source: "#Cube" materials: DefaultMaterial { diffuseColor: "red" } opacity: 0.5 } } // Copies sceneRotation Model { scale: sourceModel.scale rotation: sourceModel.sceneRotation source: "#Cube" materials: DefaultMaterial { diffuseColor: "green" } opacity: 0.5 }
If the parent of the red cube is scaled non-uniformly, the copied rotation
goes wrong.
I'll send a patch to fix the "XY uniform" (but not Z) case, which is pretty straightforward.
I'm not sure how to deal with the other "Non-uniform" case where the rotation
plane is skewed.
Attachments
For Gerrit Dashboard: QTBUG-101371 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
398552,2 | QQuick3DNode: Fix application order of local/parent rotation matrices | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
398850,2 | QQuick3DNode: Fix application order of local/parent rotation matrices | 6.2 | qt/qtquick3d | Status: MERGED | +2 | 0 |
398851,2 | QQuick3DNode: Fix application order of local/parent rotation matrices | 6.3 | qt/qtquick3d | Status: MERGED | +2 | 0 |
398894,2 | QQuick3DNode: Fix application order of local/parent rotation matrices | tqtc/lts-5.15 | qt/tqtc-qtquick3d | Status: MERGED | +2 | 0 |