Open m-7761 opened 3 years ago
I don't know how but I seem to have fixed this inadvertently at some point, that had to have been pretty recently (since I filed this report.)
My code is at https://github.com/mick-p1982/mm3d/blob/widgets95-ui/src/mm3dcore/modelviewport.cc and there is a runtime boolean constant called modelviewport_drawing_view
that switches to drawing with the same matrix the "tools" use instead of reconstructing it, but the bug is solved with this change off and on, so I'm not sure what did it. (The current code has it set to 0 but I meant to set it 1 before uploading.)
I can't figure this one out, but if you take the ortho view and start rotating it up/down you'll see that it will eventually kind of stop and start going backward and then straighten itself out and return to normal.
For some reason it's easier to do it in the vertical direction but if you have an arbitrary view sometimes it can happen with the horizontal direction.
The code in ModelViewport::rotateViewport seems unnecessarily elaborate. Maybe there's something in there. Maybe it's like a gimbal lock thing. It's pretty weird. Just putting this out there in case anyone gets to the bottom of it.