So I have a "cannon" object (basically a long cylinder) and I want to be able to control its angle. The code I have now is:
glPushMatrix() glTranslatef(self.position.x,2.5,self.position.z) glRotated(self.tube_angle, 1.0, 0.0, 1.0) glScaled(1.0, 0.5, 1.0) glCallList(self.tube.gl_list) glPopMatrix()
This rotates it around the axis, obviously. I want the bottom to stay in the spot it is (moving object) and just change the angle.