Details
Description
If a QtQuick3D Component uses Qt.quaternion() to define the orientation of the root Node, then when using the Component on level up, the eulerAngle properties are ignored.
This is very confusing, especially in the context of Qt Design Studio since Balsam uses Qt.quaternion(), while users often animate the components using eulerAngles or bind eulerAngles to slider etc.
The advantage of eulerAngles is that a single axis can be modified or animated in isolation.
See https://bugreports.qt.io/browse/QDS-6489 for details.
Since Qt.quaternion is a script binding and is therefore evaluated later, I do not see a trivial general solution. In the context of Qt Design Studio and Balsam the issue can be mitigated by defining a Node as the root of the Component that simply does not define a rotation.
Node { id: root Model { id: toyCar rotation: Qt.quaternion(0.707107, 0.707107, 0, 0) scale.x: 1 scale.y: 1 scale.z: 1
When using the component the Node does not have any rotation assigned and using eulerAngles does work as expected.
The extra Node also fixes https://bugreports.qt.io/browse/QTBUG-102389
Attachments
Issue Links
- is required for
-
QDS-6489 3D models rotation value does not reflect during runtime
-
- Open
-
- relates to
-
QTBUG-102389 Issues with relative source urls in imported QML components
-
- Closed
-
For Gerrit Dashboard: QTBUG-102390 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
405781,4 | AssimpImporter: Move material descriptions to the root node | 6.3 | qt/qtquick3d | Status: MERGED | +2 | 0 |
405783,3 | AssimpImporter: Move material descriptions to the root node | 6.2 | qt/qtquick3d | Status: ABANDONED | -1 | 0 |
407787,1 | AssimpImporter: Move material descriptions to the root node | tqtc/lts-6.2 | qt/tqtc-qtquick3d | Status: ABANDONED | 0 | 0 |