Rolling ball at different angles
Edit: SOLVED; glMultMatrixf() did work, I overlooked something.
I'm trying to have a ball roll forward, that is, rotate along its x-axis. Works fine, but when I've moved the camera around the ball, I want it to still roll forward, straight away from the camera. When the camera rotates around the ball, the ball obviously doesn't rotate with it. So now I need to reset the rotation axes so that rotating around the x-axis would be the ball rolling straight away from the camera again, but without repositioning the ball.
How do set the ball's texture coordinates 'free' from its rotation axes? There must be an easier way than to calculate the exact angle of every rotation axis with complex formulas. I spent 2 days trying to figure this out. glMultMatrixf() doesn't seem to do the job, since it only rearranges the modelview matrix.
Any help is welcome
Last edited by Katun; 11-19-2012 at 03:13 PM.