Cube Rotation on every axis with mouse input

Started by ozwizm, November 19, 2013, 22:56:26

Previous topic - Next topic

ozwizm

Hey Guys! I'm new to this forum. I just had a quick (hopefully) question. How would I go about rotating a cube on every axis using mouse input, without flipping anything over (with one way I tried, when i rotated it one way, it flipped the direction of my rotations after that)?

quew8

Why don't you take a look here http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Arcball. Good site. The input stuff there uses GLUT and the language is C++ but I'm sure you'll cope and I would be happy to assist in anyway necessary. Take a scan of the other tutorials there, there's all sorts of interesting things there.

Of course that's just one method of many, but you get the idea.