PDA

View Full Version : 3D Rotation problem



chethan
08-30-2011, 08:16 PM
Dear frnds
To rotation an object moves with x-axis, y-axis with mouse motion as left to right and top to bottom in the window but the problem here is if take the diagonal sides of the window the rotation will not take place correctly is there any solution for diagonal sides rotation formula to run the object.

ZbuffeR
08-30-2011, 11:40 PM
This sounds like you need to search for arc-ball rotation.
Sometimes juste reversing the rotation commands order in opengl will feel better (rotate around y first, then x).