Hi, QtQuick is integrated with OpenSceneGraph method (via QQuickFramebufferObject) Inside QQuickFramebufferObject I had to use setMirrorVertically(true); to get right osg view (not mirrored). The problem is with picking objects. To get world coords from mouse position I use:
Code: ... osg::Matrixd matrix; matrix.postMult(camera->getViewMatrix()); matrix.postMult(camera->getProjectionMatrix()); matrix.postMult(camera->getViewport()->computeWindowMatrix()); ... but it doesn't work If I comment line: Code: //matrix.postMult(camera->getViewport()->computeWindowMatrix()); everything works fine. But I also checked and when I use Code: osg::Matrixd matrix; matrix.postMult(camera->getViewMatrix()); matrix.postMult(camera->getProjectionMatrix()); osg::Matrix testWindowMatrix = osg::Matrix::translate(1.0,1.0,1.0)*osg::Matrix::scale(0.5*Windowwidth(),0.5*Windowheight(),0.5f)*osg::Matrix::translate(-XMousePosition,Windowheight()-YMousePosition,0.0f); matrix.postMult(testWindowMatrix); Everything is fine. Is it possible to inject somewhere right XMousePosition and YMousePosition in the osg system? Or maybe ProjectionMatrix and WindowMatrix should be const, so It looks like a problem with ViewMatrix (inverted mouse positions etc) Any ideas? Thank you! Cheers, Wojtek ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73291#73291 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

