Quote:1. Store center point.
2. Rotate from original image.
3. Get image new rect.
4. Set rect.center with store center.
huuuh, I'm not so sure to what I have to do exactly.
So in my init let's say I have
self.master_image = pygame.image.load("Sprites/Ant-rot.png").convert_alpha() self.masterrect = self.master_image.get_rect(center=(75,75)) self.image = self.master_image.copy() self.rect = self.image.get_rect(center=(75,75))and in the update part
self.image = pygame.transform.rotate(self.master_image, self.perso_angle) self.rect = self.image.get_rect(center=self.masterrect.center)when I do that my character is stuck on the right part of the screen. I'm quite lost on what I exactly have to do.
Quote:Also improve code.
yeah with each commit I try to remove/optimize useless/poorly written parts. If you had seen it when I first imported it from another code and then modified, I think you would have had a stroke ahaha.