Unsolved QOrbitCameraController not working as expected
-
Hello!
I am porting an OpenSceneGraph application to Qt3D (Qt 5.9.2). Everything works fine so far, but there is a problem regarding QOrbitCameraController: when I use the RMB to pan the view, the camera doesn't rotate about the vertical axis as expected.
I found the problem looking into the source code of the QOrbitCameraController class: the up vector is hardcoded to (0, 1, 0). Since my setup uses Z as the vertical axis, I had to set the camera up vector to (0, 0, 1), so the rotation is performed about the wrong axis.
I think that setting the controller to use the up vector from the camera would make more sense. It behaves as expected if I modify the QOrbitCameraController class code, by passing
m_camera->upVector()
topanAboutViewCenter()
, instead ofm_cameraUp
. However, this is not an optimal solution, since it requires to recompile Qt.It would be nice to have a camera controller similar to OSG's "TrackballManipulator". Will it be possible to achieve a similar behavior with the upcoming QAbstractCameraController class that's being introduced in Qt 5.10?
-
Hi @LeDrull
5.10 is already in beta phase. No chance for such changes there.
You should propose and discuss such changes on the Qt Interest mailing list anyway: http://lists.qt-project.org/mailman/listinfo
-Michael.