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

Node.sceneRotation may get wrong if parent node is scaled non-uniformly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.15.9, 6.2.4, 6.3.0
    • 6.3, 5.15, 6.2
    • Quick: 3D
    • None
    • Linux/Wayland

    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

        Activity

          People

            yuja Yuya Nishihara
            yuja Yuya Nishihara
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: