How create a camera on PyOpenGL that can do “perspective rotations” on mouse movements?

You can use glRotate to rotate around an axis, by an amount which is given by the relative mouse movement (pygame.mouse.get_rel()): mouseMove = pygame.mouse.get_rel() glRotatef(mouseMove[0]*0.1, 0.0, 1.0, 0.0) But that won’t satisfy you, because the solution won’t work any more, if the mouse leaves the window. You’ve to center the mouse in the middle of … Read more