Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102390

Qt.quaternion() always has precedence over eulerAngles even in derived components

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.3.1
    • 6.3.0 RC
    • Quick: 3D
    • None
    • 50b0f207e8 (qt/qtquick3d/6.3) 50b0f207e8 (qt/tqtc-qtquick3d/6.3) 50b0f207e8 (qt/tqtc-qtquick3d/6.3.1)

      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            thohartm Thomas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes