View Full Version : Rotation of objectwith Mouse
05-04-2004, 12:51 AM
can any body out there help me in rotating
a 3D object in space using mouse?
u can rotate in two ways move the camera or move the object apply modelview Matrix transformations
in both the cases.
05-04-2004, 04:18 AM
What I do is keep four variables: oldMouseX, oldMouseY, currMouseX, currMouseY.
Depending on the amount by which the mouse coordinates change upon dragging, I make call glRotate with a varying angle and then update the current mouse coordinates to the old mouse coordinates.
There might be easier/faster ways to accomplish it, but this is the only one I happen to know.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.