Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

how to convert the Screen coordinates to World coordinates?



  • QMatrix4x4 m;
    m.setToIdentity();
    QMatrix4x4 pro = objmgr.m_camera->projectionMatrix();
    QMatrix4x4 vi = objmgr.m_camera->viewMatrix();
    QRectF rc;
    vi.viewport(rc);
    QMatrix4x4 vp = provim;
    QVector3D PT = QVector3D(200, 2330,500);
    QVector3D SRCP = PT*vp;
    but the SRCP is too small just z=0.003,x and y always keep 0


Log in to reply