QT3D object rotation



  • Hi,

    i'm testing the 3d functions and a double rotation around the x-axis and y-axis confusing me.
    First i rotate the object only 90° around x-axis or only 90° around y-axis. All ok.

      ...
      Qt3DCore::QEntity m_entityaxis4 = new Qt3DCore::QEntity(sceneRoot);
     
      Qt3DRender::QMesh m_meshaxis4 = new Qt3DRender::QMesh();
      m_meshaxis4->setSource(QUrl(QStringLiteral("qrc:/3DObjekte/cordsystem.obj")));
     
      Qt3DCore::QTransform m_transaxis4 = new Qt3DCore::QTransform();
      m_transaxis4->setRotationX(90.0f);
      m_transaxis4->setRotationY(0.0f);
      m_transaxis4->setRotationZ(0.0f);
      
      m_entityaxis4->addComponent(m_meshaxis4);
      m_entityaxis4->addComponent(m_transaxis4);
      ...
    
    

    Two rotations like 90° around X-Axis and 90° Z-Axis working. But i think there is a problem rotate X-Axis and Y-Axis. I take some screenshoots.
    Image rotations

    It looks like there is a rotation around the X-Axis but then the Y rotation is around the orginal y-Axis not around the Y-Axis after the first rotation around the x-axis!?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.