import pygame, sys def rotate(suface,angle): rotated_surface = pygame.transform.rotozoom(man,angle,1)#can change the angle with a - rotated_rect = rotated_surface.get_rect(center = (300,300)) return rotated_surface,rotated_rect pygame.init() clock = pygame.time.Clock() screen = pygame.display.set_mode([600,600]) man = pygame.image.load("man.png") man_rect = man.get_rect(center= (300,300)) angle = 0 while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() angle += 1 screen.fill((255,255,255)) man_rotated,man_rotated_rect = rotate(man,angle) screen.blit(man_rotated,man_rotated_rect) pygame.display.flip() clock.tick(30)