I am trying to use a rotation in arcball / trackball, but I have a problem with the center of rotation. I want the center to be the center of my screen, no matter what.
Let me explain what I have done so far.
I created a square (rotation axis: vector_start x vector_end, angle: vector_start * vector_end)
From this quaternion, I created a rotation matrix to use it with glMultMatrixf (matrix) and get the desired rotation.
The problem is that although my model seems to rotate around the arc, as it always rotates around its local origin. How can I make it rotate around the center of my screen no matter where its local origin is?
I believe that the solution to this problem may be to translate the entire rotation axis in the center of the screen, and then apply the rotation, but is this possible? Am I missing something here?
rotation opengl quaternions arcball
user228144
source share