I recently just asked this question. I got my answer the only problem is the rotation is weird. It does not have one center point. The best way I can describe the rotation is the image pushed up to some left invisible wall, climbs up and then rotates until so other edge hits the invisible wall. I believe I need to set a constant center. How do I do this and where in my code do I put the center? I've looked at many examples but it seems like this weird rotation keeps occurring. Here is my code:
def update_angle(self):
orig_car = self.car1
loc = orig_car.get_rect().center
car2 = pygame.transform.rotate(orig_car, self.angle)
car2.get_rect().center = loc
return car2