2-axis ball rotation - looks funny when I do it

Started by TInychan, August 31, 2011, 08:18:16

Previous topic - Next topic

TInychan

Hi, I have the following code to rotate a ball, but it looks odd when ballTilt/ballPitch are not multiples of PI

GL11.glRotatef(ballTilt, 0f, 1f, 0f);
GL11.glRotatef(ballPitch, 1f, 0f, 0f);
sphere.draw(ballRadius, 16, 16);


I know I should be using rotation matrices or quaternions, but I can't find any up to date implementations: any ideas?



I had a look through NeHe but no hope :(